Browse files

alias RSpec::Matchers.matcher

  • Loading branch information...
1 parent 40729d0 commit 550a64d0175c3d3927b456ec9d4322a8951f71fb @dchelimsky dchelimsky committed Jun 9, 2010
Showing with 3 additions and 1 deletion.
  1. +1 −1 features/matchers/define_matcher.feature
  2. +2 −0 lib/rspec/matchers/dsl.rb
View
2 features/matchers/define_matcher.feature
@@ -199,7 +199,7 @@ Feature: define matcher
module MyHelpers
extend RSpec::Matchers::DSL
- define :be_just_like do |expected|
+ matcher :be_just_like do |expected|
match {|actual| actual == expected}
end
end
View
2 lib/rspec/matchers/dsl.rb
@@ -8,6 +8,8 @@ def define(name, &declarations)
RSpec::Matchers::Matcher.new name, *expected, &declarations
end
end
+
+ alias_method :matcher, :define
end
end
end

0 comments on commit 550a64d

Please sign in to comment.