spec/lib/helpers/rails_spec.rb in view_models-1.5.6 vs spec/lib/helpers/rails_spec.rb in view_models-1.5.7

- old
+ new

@@ -30,22 +30,18 @@ describe "specific_view_model_mapping" do 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 - # TODO really clear enough that one should provide a ViewModel with an initializer with 2 params? - # class SomeViewModelClass; end specific_view_model_mapping[String] = SomeViewModelClass lambda { view_model_for("Some String") }.should raise_error(ArgumentError, "wrong number of arguments (2 for 0)") end end describe "no specific mapping" do it "should raise on an non-mapped model" do - # TODO really clear enough that the view model class is missing? - # lambda { view_model_for(42) }.should raise_error(NameError, "uninitialized constant ViewModels::Fixnum") end it "should return a default view_model instance" do \ No newline at end of file