This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec::Matchers.define(:be_same_file_as) do |exected_file_path| | |
match do |actual_file_path| | |
expect(md5_hash(actual_file_path)).to eq(md5_hash(expected_file_path)) | |
end | |
def md5_hash(file_path) | |
Digest::MD5.hexdigest(File.read(file_path)) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file should be in .../cookbooks/database/templates/default/database.yml.erb | |
# | |
<%= @environment %>: | |
adapter: <%= @adapter %> | |
database: <%= @database %> | |
username: <%= @username %> | |
password: <%= @password %> | |
host: <%= @host %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This class is needed since Mongoid doesn't support Multi-parameter | |
# attributes in version 4.0 before it's moved to active model in rails 4 | |
# | |
# https://github.com/mongoid/mongoid/issues/2954 | |
# | |
require "spec_helper" | |
describe Mongoid::MultiParameterAttributes do |