Sha256: aebc35974e7589f6418710ac1a018c994ba9cfa411075f03ac6b22be29302b2d

Contents?: true

Size: 675 Bytes

Versions: 6

Compression:

Stored size: 675 Bytes

Contents

require 'active_support/time'
require 'timecop'
require 'timeliness'
require 'timeliness/core_ext'

module TimelinessHelpers
  def parser
    Timeliness::Parser
  end

  def definitions
    Timeliness::Definitions
  end

  def parse(*args)
    Timeliness::Parser.parse(*args)
  end

  def current_date(options={})
    Timeliness::Parser.send(:current_date, options)
  end

  def should_parse(*args)
    expect(Timeliness::Parser.parse(*args)).not_to be_nil
  end

  def should_not_parse(*args)
    expect(Timeliness::Parser.parse(*args)).to be_nil
  end
end

I18n.available_locales = ['en', 'es']

RSpec.configure do |c|
  c.mock_with :rspec
  c.include TimelinessHelpers
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
timeliness-0.4.2 spec/timeliness_helper.rb
timeliness-0.4.1 spec/timeliness_helper.rb
timeliness-0.4.0 spec/timeliness_helper.rb
timeliness-0.3.10 spec/timeliness_helper.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/timeliness-0.3.8/spec/timeliness_helper.rb
timeliness-0.3.8 spec/timeliness_helper.rb