Module: RailsFile::Matcher::Helper

Included in:
RSpec::RailsApp::File::Matchers::HaveRailsFile, RSpec::RailsApp::File::Matchers::HaveRailsFiles
Defined in:
lib/rails_app_spec/matchers/file/rails_file_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



4
5
6
# File 'lib/rails_app_spec/matchers/file/rails_file_helper.rb', line 4

def file
  @file
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/rails_app_spec/matchers/file/rails_file_helper.rb', line 4

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/rails_app_spec/matchers/file/rails_file_helper.rb', line 4

def type
  @type
end

Instance Method Details

#failure_messageObject



10
11
12
# File 'lib/rails_app_spec/matchers/file/rails_file_helper.rb', line 10

def failure_message
  "Expected #{msg}"
end

#msgObject



6
7
8
# File 'lib/rails_app_spec/matchers/file/rails_file_helper.rb', line 6

def msg
  "Rails app to have the #{type} file called #{name} at: #{file}"
end

#negative_failure_messageObject



14
15
16
# File 'lib/rails_app_spec/matchers/file/rails_file_helper.rb', line 14

def negative_failure_message
  "Did not expect #{msg}"
end