Sha256: da1f290e39791d6ac5388173d472184b0d09a99c991746e78b226c03c5aba750
Contents?: true
Size: 466 Bytes
Versions: 2
Compression:
Stored size: 466 Bytes
Contents
Spec::Matchers.define :have_files do |expected_files| match do |rails_app| actual_files = rails_app.files @missing_files = expected_files - actual_files @missing_files.empty? end failure_message_for_should do |expected_files| "Rails app was missing these files:\n" + @missing_files.map { |file| " #{file}" }.join("\n") end end Spec::Matchers.define :have_contents do |contents| match do |file| file.read.include?(contents) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cucumber-rails-0.3.1 | features/support/matchers/files.rb |
cucumber-rails-0.3.0 | features/support/matchers/files.rb |