Skip to content

Commit

Permalink
Merge pull request #237 from nashby/use-rspec-2-11
Browse files Browse the repository at this point in the history
use to method with rspec expectation instead of should
  • Loading branch information
steveklabnik committed Jul 16, 2012
2 parents f0a164d + 62b54fc commit e4319af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion draper.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |s|

s.add_development_dependency 'ammeter', '0.2.2'
s.add_development_dependency 'rake', '~> 0.9.2'
s.add_development_dependency 'rspec', '~> 2.10.0'
s.add_development_dependency 'rspec', '~> 2.10'
s.add_development_dependency 'yard'
s.add_development_dependency 'minitest', '~> 3.0' if RUBY_PLATFORM == "java"
end
18 changes: 9 additions & 9 deletions spec/draper/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class BusinessDecorator < Draper::Base
decorates:business
end
BusinessDecorator.model_class.should == Business
end.should_not raise_error
end.to_not raise_error
end

context("accepts ActiveRecord like :class_name option too") do
Expand All @@ -67,7 +67,7 @@ class CustomDecorator < Draper::Base
decorates :product, :class => Product
end
CustomDecorator.model_class.should == Product
end.should_not raise_error
end.to_not raise_error
end

it "accepts constants for :class_name" do
Expand All @@ -76,7 +76,7 @@ class CustomDecorator < Draper::Base
decorates :product, :class_name => Product
end
CustomDecorator.model_class.should == Product
end.should_not raise_error
end.to_not raise_error
end

it "accepts strings for :class" do
Expand All @@ -85,7 +85,7 @@ class CustomDecorator < Draper::Base
decorates :product, :class => 'Product'
end
CustomDecorator.model_class.should == Product
end.should_not raise_error
end.to_not raise_error
end

it "accepts strings for :class_name" do
Expand All @@ -94,7 +94,7 @@ class CustomDecorator < Draper::Base
decorates :product, :class_name => 'Product'
end
CustomDecorator.model_class.should == Product
end.should_not raise_error
end.to_not raise_error
end
end

Expand Down Expand Up @@ -669,19 +669,19 @@ class DecoratorWithDeniesAndAllows < Draper::Base
}

it "raise an exception for a blank allows" do
expect {blank_allows}.should raise_error(ArgumentError)
expect {blank_allows}.to raise_error(ArgumentError)
end

it "raise an exception for a blank denies" do
expect {blank_denies}.should raise_error(ArgumentError)
expect {blank_denies}.to raise_error(ArgumentError)
end

it "raise an exception for calling allows then denies" do
expect {using_allows_then_denies}.should raise_error(ArgumentError)
expect {using_allows_then_denies}.to raise_error(ArgumentError)
end

it "raise an exception for calling denies then allows" do
expect {using_denies_then_allows}.should raise_error(ArgumentError)
expect {using_denies_then_allows}.to raise_error(ArgumentError)
end
end

Expand Down

0 comments on commit e4319af

Please sign in to comment.