Sha256: ddad8ed88626e48ed65fd629b711599a3e264184735fc5b8557a88eb3033428f

Contents?: true

Size: 646 Bytes

Versions: 5

Compression:

Stored size: 646 Bytes

Contents

require 'rspec'

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)
    Timeliness::Parser.parse(*args).should_not be_nil
  end

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

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

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/timeliness-0.3.7/spec/spec_helper.rb
timeliness-0.3.7 spec/spec_helper.rb
timeliness-0.3.6 spec/spec_helper.rb
timeliness-0.3.5 spec/spec_helper.rb
timeliness-0.3.4 spec/spec_helper.rb