Sha256: 6304e9e8198f1680d4f80a92652f18f5c139802df0fa4caddbfdb875c5c3272d

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

class ConsoleUpdate::NamedScopeTest < Test::Unit::TestCase
  test "chained console_update calls actual named_scope" do
    big_bird = Bird.create({:name=>"big bird"})
    Bird.stub!(:system) { |editor, file|
      YAML::load_file(file)[0].keys.sort.should == Bird.default_editable_attributes.sort
    }
    ConsoleUpdate.enable_named_scope
    Bird.just_big_bird.console_update
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
cldwalker-console_update-0.1.1 test/named_scope_test.rb
console_update-0.1.2 test/named_scope_test.rb