Sha256: 3f360b4c273fec50084ec91ce0ca6e557e6ab0e2aa2462ccc3b87f9f6851c98d
Contents?: true
Size: 833 Bytes
Versions: 11
Compression:
Stored size: 833 Bytes
Contents
require File.dirname(__FILE__) + "/../spec_helper" describe IMW::Resource do describe "handling missing methods" do before do @resource = IMW::Resource.new('/home/foof.txt', :no_modules => true) end it "should return false when querying with a method that isn't defined" do @resource.is_remote?.should be_false end it "should raise an IMW::NoMethodError in any other case" do lambda { @resource.do_seomthing }.should raise_error(IMW::NoMethodError) end it "should print the modules it's been extended by when raising an IMW::NoMethodError" do begin @resource.extend(IMW::Schemes::Local::Base) @resource.do_something rescue IMW::NoMethodError => e e.message.should match(/extended by IMW::Schemes::Local::Base/) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems