watir-rspec 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b92ef9c21f1b04b64a0ffbd2f0d65e675f64b5fc
4
- data.tar.gz: 77eaffca4183a8c8715cdb747940e0cf50bed0c4
3
+ metadata.gz: 486091dd91ffb4e230effc674a0b74c7bd94c940
4
+ data.tar.gz: cb0f5a7ef8d8167e8468d7a93141d7813dfc7bdd
5
5
  SHA512:
6
- metadata.gz: 74222f68036ac04aa133a2e82a7544ad685bff5ecb073cca39eea4c39fb1b806f10bfa6266c9d119d5313d264c9387e285715d8660ccd92df6917cd8b1518901
7
- data.tar.gz: 943a90d167cbe9d87eb1cef0d270d110746c760939b4d7d834e50b3194abcc6e6fc6ec1b61f43ed0788801fbf523dfa2f77864f958f7d8e202014a3b59bc7617
6
+ metadata.gz: 7d29b9b6838170435d25c90cd301d6064c79e4c3c7b791092f58b895f679bb94f802ec42f1ca812c5ed83b89e99a8158484aba44a84f5a2e7185b3674168b4f1
7
+ data.tar.gz: ef37b4efee5d44c43a9a15cfe01ce594c766137178fcc79773adda1f763aa080a5fbdaee6c6f9d67df5a09ff7c4ddb7c9eb80ba0eb1003eaca4c10d4913ef35a
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 1.1.1 - 2013/11/24
2
+
3
+ * Fix ActiveRecord integration. Closes #8 by Stéphane Blond.
4
+
1
5
  ### 1.1.0 - 2013/10/05
2
6
 
3
7
  * Add --force option for watir-rspec command line interface to force the installation even if it seems to be already installed for the project.
@@ -2,16 +2,16 @@ if Watir::RSpec.active_record_loaded?
2
2
  require "thread"
3
3
 
4
4
  RSpec.configuration.before(:suite) do
5
- # Allow RSpec specs to use transactional fixtures when using Watir.
5
+ # Allow RSpec specs to use transactional fixtures when using Watir.
6
6
  #
7
7
  # Tip from http://blog.plataformatec.com.br/2011/12/three-tips-to-improve-the-performance-of-your-test-suite/
8
8
  class ::ActiveRecord::Base
9
- @shared_connection_semaphore = Mutex.new
9
+ @@shared_connection_semaphore = Mutex.new
10
10
 
11
11
  class << self
12
12
  def connection
13
- @shared_connection_semaphore.synchronize do
14
- @shared_connection ||= retrieve_connection
13
+ @@shared_connection_semaphore.synchronize do
14
+ @@shared_connection ||= retrieve_connection
15
15
  end
16
16
  end
17
17
  end
@@ -1,5 +1,5 @@
1
1
  module Watir
2
2
  class RSpec
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
@@ -1,9 +1,12 @@
1
1
  require "spec_helper"
2
2
 
3
- describe ::ActiveRecord::Base do
4
- before { described_class.instance_variable_set :@shared_connection, nil }
3
+ class TestModel < ::ActiveRecord::Base
4
+ end
5
5
 
6
+ describe TestModel do
6
7
  context ".connection" do
8
+ before { described_class.class_variable_set :@@shared_connection, nil }
9
+
7
10
  it "reuses the connection" do
8
11
  described_class.should_receive(:retrieve_connection).once.and_return(:established_connection)
9
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarmo Pertman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-05 00:00:00.000000000 Z
11
+ date: 2013-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec