Permalink
Browse files

Merge pull request #23 from freelancing-god/string_methods

Handle strings as well as symbols for method stubs.
  • Loading branch information...
2 parents 8444090 + 0907ec7 commit e02f3250ba3b906084a62a832461cbc4e0a8a128 @xaviershay committed Jul 15, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −1 lib/rspec/fire.rb
  2. +3 −0 spec/fire_double_spec.rb
View
@@ -177,7 +177,7 @@ def implemented_methods(doubled_class, checked_methods)
end
def unimplemented_methods(doubled_class, expected_methods, checked_methods)
- expected_methods -
+ expected_methods.map(&:to_sym) -
implemented_methods(doubled_class, checked_methods)
end
@@ -58,11 +58,14 @@ def clear_config
describe 'doubled class is not loaded' do
let(:doubled_object) { fire_double("UnloadedObject") }
should_allow(:undefined_method)
+ should_allow('undefined_method')
end
describe 'doubled class is loaded' do
should_allow(:defined_method)
+ should_allow('defined_method')
should_not_allow(:undefined_method)
+ should_not_allow('undefined_method')
end
end

0 comments on commit e02f325

Please sign in to comment.