2013-05-10 18:10:46 +00:00
|
|
|
module Shoulda # :nodoc:
|
|
|
|
module Matchers
|
|
|
|
class RailsShim # :nodoc:
|
|
|
|
|
|
|
|
def self.layouts_ivar
|
|
|
|
if rails_major_version >= 4
|
|
|
|
'@_layouts'
|
|
|
|
else
|
|
|
|
'@layouts'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-05-10 19:18:30 +00:00
|
|
|
def self.flashes_ivar
|
|
|
|
if rails_major_version >= 4
|
|
|
|
:@flashes
|
|
|
|
else
|
|
|
|
:@used
|
|
|
|
end
|
|
|
|
end
|
2013-05-10 18:10:46 +00:00
|
|
|
|
|
|
|
def self.rails_major_version
|
|
|
|
Rails::VERSION::MAJOR
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|