Sha256: ba452ee8e71121f36ef7e045918f0c4fd60bd1e90fe894b7117f2194289a20fd

Contents?: true

Size: 641 Bytes

Versions: 11

Compression:

Stored size: 641 Bytes

Contents

def macruby?
  defined?(RUBY_ENGINE) && RUBY_ENGINE == 'macruby'
end

require 'simplecov'
SimpleCov.start unless macruby?
require 'multi_json'
require 'rspec'

class MockDecoder
  def self.decode(string, options = {})
    {'abc' => 'def'}
  end

  def self.encode(string)
    '{"abc":"def"}'
  end
end

class TimeWithZone
  def to_json(options = {})
    "\"2005-02-01T15:15:10Z\""
  end
end

def yajl_on_travis(engine)
  ENV['TRAVIS'] && engine == 'yajl' && jruby?
end

def nsjsonserialization_on_other_than_macruby(engine)
  engine == 'nsjsonserialization' && !macruby?
end

def jruby?
  defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
end

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
challah-0.6.2 vendor/bundle/gems/multi_json-1.1.0/spec/helper.rb
challah-0.6.1 vendor/bundle/gems/multi_json-1.1.0/spec/helper.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/multi_json-1.1.0/spec/helper.rb
challah-0.6.0 vendor/bundle/gems/multi_json-1.1.0/spec/helper.rb
challah-0.5.4 vendor/bundle/gems/multi_json-1.1.0/spec/helper.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/multi_json-1.1.0/spec/helper.rb
challah-0.5.3 vendor/bundle/gems/multi_json-1.1.0/spec/helper.rb
challah-0.5.2 vendor/bundle/gems/multi_json-1.1.0/spec/helper.rb
challah-0.5.1 vendor/bundle/gems/multi_json-1.1.0/spec/helper.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/multi_json-1.1.0/spec/helper.rb
multi_json-1.1.0 spec/helper.rb