Sha256: 16615d31b920bd4206bf770521f0961b879c712b590c52448c5e5c47f66861df

Contents?: true

Size: 553 Bytes

Versions: 29

Compression:

Stored size: 553 Bytes

Contents

require 'gorgon/job_definition'
require 'yajl'

describe JobDefinition do
  before(:all) do
    @json_parser = Yajl::Parser.new(:symbolize_keys => true)
  end

  describe "#to_json" do
    it "should serialize itself to json" do
      expected_hash = {:type => "job_definition", :file_queue_name => "string 1", :reply_exchange_name => "string 2", :source_tree_path => "string 3", :sync_exclude => "string 4", :callbacks => {}}

      jd = JobDefinition.new(expected_hash)

      @json_parser.parse(jd.to_json).should == expected_hash
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
gorgon-0.7.1 spec/job_definition_spec.rb
gorgon-0.7.0 spec/job_definition_spec.rb
gorgon-0.7.0.rc4 spec/job_definition_spec.rb
gorgon-0.7.0.rc3 spec/job_definition_spec.rb
gorgon-0.7.0.rc2 spec/job_definition_spec.rb
gorgon-0.7.0.rc1 spec/job_definition_spec.rb
gorgon-0.6.5 spec/job_definition_spec.rb
gorgon-0.6.4 spec/job_definition_spec.rb
gorgon-0.6.3 spec/job_definition_spec.rb
gorgon-0.6.2 spec/job_definition_spec.rb
gorgon-0.6.1 spec/job_definition_spec.rb
gorgon-0.6.0 spec/job_definition_spec.rb
gorgon-0.6.0.rc2 spec/job_definition_spec.rb
gorgon-0.6.0.rc1 spec/job_definition_spec.rb
gorgon-0.5.0.rc1 spec/job_definition_spec.rb
gorgon-0.4.5 spec/job_definition_spec.rb
gorgon-0.4.5.rc1 spec/job_definition_spec.rb
gorgon-0.4.4 spec/job_definition_spec.rb
gorgon-0.4.3 spec/job_definition_spec.rb
gorgon-0.4.2 spec/job_definition_spec.rb