Em 19-10-2012 09:18, Rodrigo Rosenfeld Rosas escreveu:
Em 18-10-2012 21:15, David Chelimsky escreveu:
On Thu, Oct 18, 2012 at 6:58 PM, Rodrigo Rosenfeld Rosas
<lboc...@yahoo.com.br>  wrote:
My specs work fine with this in my Gemfile.lock:

grep rspec Gemfile.lock
     rspec (2.11.0)
       rspec-core (~>  2.11.0)
       rspec-expectations (~>  2.11.0)
       rspec-mocks (~>  2.11.0)
     rspec-core (2.11.0)
     rspec-expectations (2.11.1)
     rspec-mocks (2.11.1)
     rspec-rails (2.11.0)
       rspec (~>  2.11.0)
   rspec-rails (~>  2.11)

After "bundle update rspec", I started to have problems like this when
What's in your Gemfile.lock after you do the upgrade?

https://gist.github.com/6d862798a665e3cc5546

Diff is:

diff --git a/Gemfile.lock b/Gemfile.lock
index f3d46d6..3a40e8d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -210,10 +210,10 @@ GEM
       rspec-core (~> 2.11.0)
       rspec-expectations (~> 2.11.0)
       rspec-mocks (~> 2.11.0)
-    rspec-core (2.11.0)
-    rspec-expectations (2.11.1)
+    rspec-core (2.11.1)
+    rspec-expectations (2.11.3)
       diff-lcs (~> 1.1.3)
-    rspec-mocks (2.11.1)
+    rspec-mocks (2.11.3)
     rspec-rails (2.11.0)
       actionpack (>= 3.0)
       activesupport (>= 3.0)


>  grep rspec Gemfile.lock

   rspec (2.11.0)
       rspec-core (~>  2.11.0)
       rspec-expectations (~>  2.11.0)
       rspec-mocks (~>  2.11.0)
     rspec-core (2.11.1)
     rspec-expectations (2.11.3)
     rspec-mocks (2.11.3)
     rspec-rails (2.11.0)
       rspec (~>  2.11.0)
   rspec-rails (~>  2.11)

Also, I must say that it still works with this diff (by manually tweaking Gemfile.lock):

diff --git a/Gemfile.lock b/Gemfile.lock
index f3d46d6..3750aa9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -211,9 +211,9 @@ GEM
       rspec-expectations (~> 2.11.0)
       rspec-mocks (~> 2.11.0)
     rspec-core (2.11.0)
-    rspec-expectations (2.11.1)
+    rspec-expectations (2.11.2)
       diff-lcs (~> 1.1.3)
-    rspec-mocks (2.11.1)
+    rspec-mocks (2.11.3)
     rspec-rails (2.11.0)
       actionpack (>= 3.0)
       activesupport (>= 3.0)

But if I try to either upgrade rspec-expectations to 2.11.3 or rspec-core to 2.11.1 it will break my specs.

Upgrading just rspec-expectations would break the first spec.

On the other side, upgrading rspec-core would break 2 specs the first time it runs. After that it won't rollback my changes and I'll have to drop and recreate my test database :(


running "bundle exec rspec":

  Failure/Error: Unable to find matching line from backtrace
      NoMethodError:
        undefined method `cmd_tuples' for nil:NilClass
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/adapters/postgres.rb:191:in
`execute'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/adapters/postgres.rb:532:in
`log_connection_execute'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/database/query.rb:547:in
`rollback_transaction'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/database/query.rb:296:in
`rescue in _transaction'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/database/query.rb:309:in
`_transaction'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/database/query.rb:255:in
`block in transaction'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/database/connecting.rb:229:in
`block in synchronize'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/connection_pool/threaded.rb:88:in
`hold'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/database/connecting.rb:229:in
`synchronize'
      #
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286@rails/gems/sequel-3.35.0/lib/sequel/database/query.rb:253:in
`transaction'
      # /home/rodrigo/ecore/src/ruby/matterhorn/spec/spec_helper.rb:51:in
`block (3 levels) in<top (required)>'
      ...

See this spec_helper extract:

     config.around(:each) do |example|
51:  DB.transaction(savepoint: true, rollback: :always) do
         example.run
       end
     end

Any idea of what has been changed since the releases I'm using that could be
causing this?

Only the first spec is failing. All others are passing.

I don't have any clue why I can't upgrade RSpec... :(

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users



_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to