diff --git a/Gemfile b/Gemfile index ef48806..fbf285c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source :gemcutter -gem 'rails', '>= 3.2.0' +gem 'rails', '>= 3.0.0' group :test do gem 'rake' diff --git a/Gemfile.lock b/Gemfile.lock index b60631d..931794d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,7 +96,7 @@ PLATFORMS ruby DEPENDENCIES - rails (>= 3.2.0) + rails (>= 3.0.0) rake rspec (>= 2.0.0) rspec-rails (>= 2.0.0) diff --git a/spec/lib/view_models/helpers/mapping_spec.rb b/spec/lib/view_models/helpers/mapping_spec.rb index 547ba3d..dad359d 100644 --- a/spec/lib/view_models/helpers/mapping_spec.rb +++ b/spec/lib/view_models/helpers/mapping_spec.rb @@ -18,12 +18,12 @@ class ViewModels::SomeModelClazz < ViewModels::Base; end it "should return an empty hash by default" do specific_view_model_mapping.should == {} end - it "should raise an ArgumentError on an non-mapped model" do - class SomeViewModelClass; end + it "should raise an ArgumentError on model that does not support 2 arguments" do + class SomeViewModelClass; def initialize; end; end specific_view_model_mapping[String] = SomeViewModelClass lambda { view_model_for("Some String") - }.should raise_error(ArgumentError) + }.should raise_error(ArgumentError, /2 for 0/) end end describe "no specific mapping" do