Sha256: 30afcc6c0b397d434fcfb71f7ff8b2a9425416f4329f8f0108764c706290fc64

Contents?: true

Size: 680 Bytes

Versions: 7

Compression:

Stored size: 680 Bytes

Contents

require 'test_helper'

class EditableManifestTest < Test::Unit::TestCase

  def record
    EditableManifest.new(self) { |m| yield m }
  end

  def action(param)
    @actions_received << param
  end

  context "An editable manifest with a couple of recorded actions" do
    setup do
      @actions_received = []
      @man = record do |m|
        m.action('one')
        m.action('two')
      end
    end

    should "allow me to delete an action" do
      @man.edit do |action|
        action unless action[1].include? 'one'
      end
      @man.replay(self)
      assert_does_not_contain @actions_received, 'one'
      assert_contains @actions_received, 'two'
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
view_mapper-0.3.4 test/editable_manifest_test.rb
view_mapper-0.3.3 test/editable_manifest_test.rb
view_mapper-0.3.2 test/editable_manifest_test.rb
view_mapper-0.3.1 test/editable_manifest_test.rb
view_mapper-0.3.0 test/editable_manifest_test.rb
view_mapper-0.2.0 test/editable_manifest_test.rb
view_mapper-0.1.0 test/editable_manifest_test.rb