Sha256: 07f8c9b7909ac2177142879611b1bdc135e53f7540deccac489cc83d82110228

Contents?: true

Size: 1.01 KB

Versions: 8

Compression:

Stored size: 1.01 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( { name: 'a name',
                               type: 'a type',
                               arguments: ['1234', 2] } )
      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( { name: 'a name',
                               type: 'a type',
                               arguments: ['1234', 2] } )
      step = Seam::Step.new step.to_hash
      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

8 entries across 8 versions & 2 rubygems

Version Path
seam-0.0.17 spec/seam/step_spec.rb
seam-0.0.16 spec/seam/step_spec.rb
seam-0.0.15 spec/seam/step_spec.rb
seam-mongodb-0.0.4 spec/seam/step_spec.rb
seam-mongodb-0.0.3 spec/seam/step_spec.rb
seam-0.0.14 spec/seam/step_spec.rb
seam-0.0.13 spec/seam/step_spec.rb
seam-0.0.12 spec/seam/step_spec.rb