Sha256: df851ff6c7b2bfaffff18133ebb829c874ad590bef2b031be632a48170014e72

Contents?: true

Size: 340 Bytes

Versions: 15

Compression:

Stored size: 340 Bytes

Contents

module TimeComparisonMatchers
  extend RSpec::Matchers::DSL

  matcher :eq_time do |expected_time|
    match do |actual_time|
      actual_time.to_time.to_i == expected_time.to_time.to_i
    end

    failure_message do |actual_time|
      "expected #{actual_time.to_time} to be equal in time to #{expected_time.to_time}"
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
almanack-1.1.0 spec/support/time_comparison_matchers.rb
almanack-1.1.0.beta6 spec/support/time_comparison_matchers.rb
almanack-1.1.0.beta5 spec/support/time_comparison_matchers.rb
almanack-1.1.0.beta4 spec/support/time_comparison_matchers.rb
almanack-1.1.0.beta3 spec/support/time_comparison_matchers.rb
almanack-1.1.0.beta2 spec/support/time_comparison_matchers.rb
almanack-1.1.0.beta1 spec/support/time_comparison_matchers.rb
almanack-1.0.5 spec/support/time_comparison_matchers.rb
almanack-1.0.4 spec/support/time_comparison_matchers.rb
almanack-1.0.3 spec/support/time_comparison_matchers.rb
almanack-1.0.2 spec/support/time_comparison_matchers.rb
almanack-1.0.1 spec/support/time_comparison_matchers.rb
almanack-1.0.0 spec/support/time_comparison_matchers.rb
almanack-1.0.0.pre1 spec/support/time_comparison_matchers.rb
almanack-1.0.0.pre spec/support/time_comparison_matchers.rb