Sha256: 8150ca95c8abd66e1ae4c414ea702ce27b1d3ae9a34c8c3a5dbddb821878a35d

Contents?: true

Size: 574 Bytes

Versions: 13

Compression:

Stored size: 574 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",
        :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

13 entries across 13 versions & 1 rubygems

Version Path
gorgon-0.11.0 spec/job_definition_spec.rb
gorgon-0.10.5 spec/job_definition_spec.rb
gorgon-0.10.4 spec/job_definition_spec.rb
gorgon-0.10.3 spec/job_definition_spec.rb
gorgon-0.10.2 spec/job_definition_spec.rb
gorgon-0.10.1 spec/job_definition_spec.rb
gorgon-0.10.0 spec/job_definition_spec.rb
gorgon-0.9.0 spec/job_definition_spec.rb
gorgon-0.8.4 spec/job_definition_spec.rb
gorgon-0.8.3 spec/job_definition_spec.rb
gorgon-0.8.2 spec/job_definition_spec.rb
gorgon-0.8.1 spec/job_definition_spec.rb
gorgon-0.8.0 spec/job_definition_spec.rb