Permalink
Browse files

Using new RSpec syntax.

  • Loading branch information...
1 parent 5c3ada2 commit a115d59b1d32486a58e2b56d0d31c331431fa265 @fnando committed Aug 11, 2012
Showing with 7 additions and 7 deletions.
  1. +6 −6 spec/base_spec.rb
  2. +1 −1 spec/simple_presenter_spec.rb
View
@@ -25,7 +25,7 @@
it "uses provided block" do
numbers = []
subject.each {|n| numbers << n}
- numbers.should == [1, 2, 3]
+ expect(numbers).to eql([1, 2, 3])
end
end
end
@@ -57,7 +57,7 @@
presenter_class.subject :thing
presenter = presenter_class.new(thing)
- presenter.instance_variable_get("@thing").should eql(thing)
+ expect(presenter.instance_variable_get("@thing")).to eql(thing)
end
context "using defaults" do
@@ -137,7 +137,7 @@
subject { UserPresenter.new(user) }
it "assigns the subject" do
- subject.instance_variable_get("@subject").should == user
+ expect(subject.instance_variable_get("@subject")).to eql(user)
end
end
@@ -147,9 +147,9 @@
context "subjects" do
subject { presenter.subjects }
- specify { subject.should have(2).items }
- specify { subject.first.should eql(:comment) }
- specify { subject.last.should eql(:post) }
+ specify { expect(subject).to have(2).items }
+ specify { expect(subject.first).to eql(:comment) }
+ specify { expect(subject.last).to eql(:post) }
end
context "attributes" do
@@ -2,6 +2,6 @@
describe SimplePresenter do
it "assigns SimplePresenter::Base" do
- ::Presenter.should be(SimplePresenter::Base)
+ expect(::Presenter).to be(SimplePresenter::Base)
end
end

0 comments on commit a115d59

Please sign in to comment.