Sha256: d5a4591d7f356f2022e2f6298e6ae8f470849c4026f00f81d2eee5faeb40485f

Contents?: true

Size: 534 Bytes

Versions: 4

Compression:

Stored size: 534 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 = {: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

4 entries across 4 versions & 1 rubygems

Version Path
gorgon-0.1.1 spec/job_definition_spec.rb
gorgon-0.1.0 spec/job_definition_spec.rb
gorgon-0.0.2 spec/job_definition_spec.rb
gorgon-0.0.1 spec/job_definition_spec.rb