Skip to content

Commit ca7e159

Browse files
committedNov 27, 2014
Add some specs for named subjects
1 parent 88170ba commit ca7e159

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
 

‎spec/named_subject_spec.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
describe "named subject" do
2+
subject(:named_subject) { [1, 2, 3] }
3+
4+
it "should be the subject" do
5+
subject.should be_kind_of(Array)
6+
end
7+
8+
it "should be the named subject" do
9+
subject.should eql(named_subject)
10+
end
11+
end

‎spec/should_syntax_spec.rb

+4
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
it { is_expected.to eq(42) }
1111
it { is_expected.to_not eq(43) }
1212
end
13+
14+
describe "expect" do
15+
it { expect(42).to eq(42) }
16+
end
1317
end

0 commit comments

Comments
 (0)
Please sign in to comment.