thoughtbot--shoulda-matchers/lib/shoulda/matchers/rails_shim.rb

21 lines
325 B
Ruby

module Shoulda # :nodoc:
module Matchers
class RailsShim # :nodoc:
def self.layouts_ivar
if rails_major_version >= 4
'@_layouts'
else
'@layouts'
end
end
private
def self.rails_major_version
Rails::VERSION::MAJOR
end
end
end
end