Permalink
Browse files

convert matchers to subclass BaseMatcher class

  • Loading branch information...
1 parent ebd891f commit 91870eda039d9fcc2b44ec6b7910ec3bd3d835f6 @dchelimsky dchelimsky committed Jun 26, 2012
@@ -1,6 +1,5 @@
module RSpec::Rails::Matchers
- class BeANew
- include RSpec::Matchers::BuiltIn::BaseMatcher
+ class BeANew < RSpec::Matchers::BuiltIn::BaseMatcher
def initialize(expected)
@expected = expected
@@ -1,6 +1,5 @@
module RSpec::Rails::Matchers
- class BeANewRecord
- include RSpec::Matchers::BuiltIn::BaseMatcher
+ class BeANewRecord < RSpec::Matchers::BuiltIn::BaseMatcher
# @api private
def matches?(actual)
@@ -1,7 +1,6 @@
module RSpec::Rails::Matchers
module RenderTemplate
- class RenderTemplateMatcher
- include RSpec::Matchers::BuiltIn::BaseMatcher
+ class RenderTemplateMatcher < RSpec::Matchers::BuiltIn::BaseMatcher
def initialize(scope, expected, message=nil)
@expected = Symbol === expected ? expected.to_s : expected
@@ -1,7 +1,6 @@
module RSpec::Rails::Matchers
module RedirectTo
- class RedirectTo
- include RSpec::Matchers::BuiltIn::BaseMatcher
+ class RedirectTo < RSpec::Matchers::BuiltIn::BaseMatcher
def initialize(scope, expected)
@expected = expected
@@ -2,8 +2,7 @@ module RSpec::Rails::Matchers
module RoutingMatchers
extend RSpec::Matchers::DSL
- class RouteToMatcher
- include RSpec::Matchers::BuiltIn::BaseMatcher
+ class RouteToMatcher < RSpec::Matchers::BuiltIn::BaseMatcher
def initialize(scope, *expected)
@scope = scope
@@ -58,8 +57,7 @@ def route_to(*expected)
RouteToMatcher.new(self, *expected)
end
- class BeRoutableMatcher
- include RSpec::Matchers::BuiltIn::BaseMatcher
+ class BeRoutableMatcher < RSpec::Matchers::BuiltIn::BaseMatcher
def initialize(scope)
@scope = scope

0 comments on commit 91870ed

Please sign in to comment.