RSpec testing

18 views
Skip to first unread message

Dominic Graefen

unread,
Sep 22, 2011, 7:51:36 AM9/22/11
to build...@googlegroups.com
Hey guys,

I've just committed some things to the spec feature branch: https://github.com/devboy/buildr_as3/commit/a5c17b05147a7d9c80c39faad548ce15eddd87b8
I've included two files from the buildr project which they use for testing,
but all the paths to other files in there are relative to the buildr project.

Do you think it is a good idea to just inspect the path to the buildr gem,
and then load these helpers in from the actual buildr gem location?

Would it matter in any way? 
If we just target a single version of buildr this should work right?

-- 
Dominic Graefen
Freelance: Interactive Developer / Creative Technologist

devboy

unread,
Sep 22, 2011, 8:34:30 AM9/22/11
to build...@googlegroups.com
I've just tried this out and came to the conclusion that this doesn't make much sense as it will include too much bagagge of buildr itself which will only make our testing process harder.
I'll try and see which parts are useful for buildr-as3 testing and take them over and we will stay independent of buildr test-helpers.

Dominic Graefen

unread,
Sep 22, 2011, 10:33:39 AM9/22/11
to build...@googlegroups.com
I've been trying to rip some parts out but I am getting mysterious errors: https://github.com/devboy/buildr_as3/commit/a1707d9a109f9b3386eb4c6c8fe04c31bb74251d#commitcomment-605155

Might actually need to write this from scratch ...

-- 
Dominic Graefen
Freelance: Interactive Developer / Creative Technologist

Dominic Graefen

unread,
Sep 22, 2011, 10:54:44 AM9/22/11
to build...@googlegroups.com
So as soon as I add require 'buildr' into some place in the specs I am facing this error:

( ~/Development/Source/Ruby/buildr_as3 )
devboy > bundle exec rake spec
(in /Users/devboy/Development/Source/Ruby/buildr_as3)
rm -rf /Users/devboy/Development/Source/Ruby/buildr_as3/test/report
/Users/devboy/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -S bundle exec rspec "spec/as3/mxml_spec.rb"
/Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing': uninitialized constant Buildr::RSpec::Matchers (NameError)
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/backward_compatibility.rb:20:in `const_missing'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb:21:in `<top (required)>'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-expectations-2.1.0/lib/rspec/matchers/be.rb:1:in `require'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-expectations-2.1.0/lib/rspec/matchers/be.rb:1:in `<top (required)>'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-expectations-2.1.0/lib/rspec/matchers.rb:172:in `require'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-expectations-2.1.0/lib/rspec/matchers.rb:172:in `<top (required)>'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-expectations-2.1.0/lib/rspec/expectations.rb:2:in `require'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-expectations-2.1.0/lib/rspec/expectations.rb:2:in `<top (required)>'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/expecting/with_rspec.rb:1:in `require'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/expecting/with_rspec.rb:1:in `<top (required)>'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/configuration.rb:144:in `require'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/configuration.rb:144:in `require_expectation_framework_adapter'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/configuration.rb:329:in `configure_expectation_framework'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/command_line.rb:20:in `run'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/runner.rb:55:in `run_in_process'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/runner.rb:46:in `run'
from /Users/devboy/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.1.0/lib/rspec/core/runner.rb:10:in `block in autorun'
rake aborted!
ruby -S bundle exec rspec "spec/as3/mxml_spec.rb" failed


Not sure on how I can make this work, this is by the way the same error I had before. So if I can fix this we might be able to still use the helpers I was trying before.

-- 
Dominic Graefen
Freelance: Interactive Developer / Creative Technologist

Dominic Graefen

unread,
Sep 22, 2011, 12:12:16 PM9/22/11
to build...@googlegroups.com
I've asked a question on the buildr dev mailing-list regarding this, let's see if they can help out.


-- 
Dominic Graefen
Freelance: Interactive Developer / Creative Technologist

Dominic Graefen

unread,
Sep 22, 2011, 4:53:34 PM9/22/11
to build...@googlegroups.com
It seems I could solve the problem and we now have even the spec helpers from buildr working.


Let's start testing :)

-- 
Dominic Graefen
Freelance: Interactive Developer / Creative Technologist

Simon Bailey

unread,
Sep 22, 2011, 5:19:21 PM9/22/11
to build...@googlegroups.com
Excellent well done man!!!!

Dominic Graefen

unread,
Sep 22, 2011, 5:22:05 PM9/22/11
to build...@googlegroups.com

-- 
Dominic Graefen
Freelance: Interactive Developer / Creative Technologist

Reply all
Reply to author
Forward
0 new messages