Sha256: 4ddbc81237bbd933f64006d084d9bcf42d0137862ca95d6442cfafa3b39b97c1

Contents?: true

Size: 445 Bytes

Versions: 8

Compression:

Stored size: 445 Bytes

Contents

require 'rubygems'
require 'spec'
dir = File.dirname(__FILE__)
require File.expand_path("#{dir}/spec_helper")
require File.expand_path("#{dir}/../lib/fjson")

context "An object" do
  specify "should convert its string representation to json" do
    obj = Object.new
    obj_str = obj.to_s
    obj.to_json.should_equal '"' + obj_str + '"'
  end

  specify "to_json should accept any number of arguments" do
    Object.new.to_json(1, 2)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fjson-0.0.1 spec/object_spec.rb
fjson-0.0.2 spec/object_spec.rb
fjson-0.0.3 spec/object_spec.rb
fjson-0.0.4 spec/object_spec.rb
fjson-0.0.5 spec/object_spec.rb
fjson-0.0.6 spec/object_spec.rb
fjson-0.0.7 spec/object_spec.rb
fjson-0.0.8 spec/object_spec.rb