lib/gem_suit/cli.rb in gem_suit-0.1.2 vs lib/gem_suit/cli.rb in gem_suit-0.1.3
- old
+ new
@@ -109,10 +109,10 @@
end
desc "test [SECTION] [FILES]", "Run GemSuit (suit, unit, functional, integration) tests"
method_options [:rails_versions, "-r"] => :array, [:verbose, "-v"] => false, [:very_verbose, "-w"] => false
def test(section = "suit", file_or_pattern = nil)
- if Application::InstanceMethods.instance_methods.include?(method = "test_#{section}")
+ if Application::InstanceMethods.instance_methods.collect(&:to_s).include?(method = "test_#{section}")
send method, file_or_pattern
elsif file_or_pattern.nil?
test_suit section
else
raise Error, "Unrecognized test section '#{section}'. Either leave it empty or pass 'suit', 'unit', 'functional' or 'integration'"
\ No newline at end of file