Sha256: 3b8bbc1b330031159791dd577dc65158dac61ffd5c43d5f27652fa78e129a263

Contents?: true

Size: 1.16 KB

Versions: 15

Compression:

Stored size: 1.16 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Seam::Step do
  describe "initialize" do
    it "should allow values to be set with the constructor" do
      step = Seam::Step.new( { id:   'an id',
                               name: 'a name',
                               type: 'a type',
                               arguments: ['1234', 2] } )
      step.id.must_equal 'an id'
      step.name.must_equal 'a name'
      step.type.must_equal 'a type'
      step.arguments.count.must_equal 2
      step.arguments[0].must_equal '1234'
      step.arguments[1].must_equal 2
    end
  end

  describe "to hash" do
    it "should allow values to be set with the constructor" do
      step = Seam::Step.new( { id:   'an id',
                               name: 'a name',
                               type: 'a type',
                               arguments: ['1234', 2] } )
      step = Seam::Step.new step.to_hash
      step.id.must_equal 'an id'
      step.name.must_equal 'a name'
      step.type.must_equal 'a type'
      step.arguments.count.must_equal 2
      step.arguments[0].must_equal '1234'
      step.arguments[1].must_equal 2
    end
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
seam-active_record-1.1.0 test_app/spec/seam/step_spec.rb
seam-1.1.3 spec/seam/step_spec.rb
seam-1.1.2 spec/seam/step_spec.rb
seam-active_record-1.0.2 test_app/spec/seam/step_spec.rb
seam-1.1.1 spec/seam/step_spec.rb
seam-active_record-1.0.1 test_app/spec/seam/step_spec.rb
seam-1.1.0 spec/seam/step_spec.rb
seam-active_record-1.0.0 test_app/spec/seam/step_spec.rb
seam-1.0.1 spec/seam/step_spec.rb
seam-mongodb-1.0.0 spec/seam/step_spec.rb
seam-1.0.0 spec/seam/step_spec.rb
seam-mongodb-0.0.5 spec/seam/step_spec.rb
seam-0.0.20 spec/seam/step_spec.rb
seam-0.0.19 spec/seam/step_spec.rb
seam-0.0.18 spec/seam/step_spec.rb