search for: foo_spec

Displaying 10 results from an estimated 10 matches for "foo_spec".

2007 Jan 10
7
foo_spec.rb -> foo.rspec (proposed RSpec file name convention)
Is it too late to suggest some filename conventions for example rspec files--especially when bundling with gems? I see spec_foo.rb and foo_spec.rb around. Also found some foo_ex.rb around. Would having a foo.rspec be worth talking about? Or is the convention more or less to have ''spec'' in the file name? I have to confess the only real motivation I have at the moment is syntax highlighting without adding RSpec DSL tags to...
2009 Apr 22
1
Tests for my gem cannot find classes in gems lib directory ..
...pec below. I feel I must be missing something obvious. Additionally, I did output the value of f in lib inclusion code and it is traversing the lib folder correctly and I can instantiate the class in my rake.spec. Thanks for your time. gem_name + lib +gem_name -foo.rb +spec - foo_spec.rb +tasks - spec.rake my spec rake require ''rubygems'' require ''spec'' require ''spec/rake/spectask'' Dir[File.expand_path("lib/**/*.rb")].each do |f| require f end Spec::Rake::SpecTask.new do |t| t.spec_files = FileList['...
2008 Sep 24
19
How to define request.domain in when testing
Hi, My application relies on request.domain for doing its job. The problem I am encountering, is that when running tests, request.domain returns "test.host", how can I change that so that it returns "mysite.com"? Thanks in advance. -- Posted via http://www.ruby-forum.com/.
2006 Dec 20
16
Edge RSpec on Rails...what did I forget?
...ils plugin vendor/plugins/rspec (svn://rubyforge.org/var/svn/rspec/trunk/rspec) - 1332 vendor/plugins/rspec_on_rails (svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/vendor/plugins/rspec_on_rails) - 1332 Generated the rspec file, created a model...the spec runs fine if I do ruby spec/models/foo_spec.rb. Running rake though gives me the Your RSpec on Rails plugin is incompatible with your installed RSpec. RSpec : 0.7.5 (r1330) RSpec on Rails : r1332 error. So apparently it''s looking at the gem rspec instead of the one I installed in my plugins folder. I''ve got a...
2006 Dec 19
1
something.should_be_open blows up?
context "A new Foo" specify "should be open" do Foo.new.should_be_open end end ArgumentError in ''A new Foo should be open'' wrong number of arguments (0 for 1) ./foo_spec.rb:9: class Foo def open?; true; end end What''s the deal with that? I looked in the RDoc and nothing seems to define open?. I can get around it for now by doing the opposite (should_not_be_closed), but that seems sorta weird. Anyone else have issues? Pat
2008 Jun 04
8
Why has the --color gone from my life?
Hi all, Running on OSX 10.5.3, Latest Rspec trunk, Rspec rails trunk, latest autotest gem and rails 2.1 I''ve lost my colour output in autotest. rake spec gives colour output, but autotest gives me black and white. It was working a little bit before, I think I upgraded to the latest versions of everything to get all the textmate snippets talking and being friendly to one another again
2010 Sep 15
1
specs inside subfolder of lib folder not displaying proper error messages
...as below: ''Test one'' FAILED expected: 2, got: 1 (using ==) but if i move the spec directly under lib or any other folder then i see the file name and line number with error message as below ''Test one'' FAILED expected: 2, got: 1 (using ==) ./spec/SFA/foo_spec.rb:6: my project structure is somewhat like below project project/app project/app/models project/lib project/lib/extension project/spec project/spec/app project/spec/lib project/spec/lib/extension so if i place the spec file under ''project/spec/lib/extension'' or any folder in th...
2007 Jan 04
8
Common setup code and naming specifications
Hello! I have a lot of contexts for testing Rails controllers, that must do something like ''session[:logged_in] = true'' in their setup. How can this be refactored? In unit tests I would simply create a LoggedInControllerTest base class, that all my functional tests would derive from. And another small question: In my controller specifications I often have to decide whether to
2007 Oct 22
13
An error on edge at -r 2767
Morning, Having done an svn up this morning all my specs are broken with the following: SQLite3::SQLException in ServiceConfig with minimum set of valid parameters should return nil for the service path'' SQL logic error or missing database C:/development/sandbox/prototypes/user_admin_client/config/../vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/rails_example.rb:17:in
2008 Mar 20
1
Combining autotest, rspec, rspec_on_rails and spec-server
Hello, I''ve been trying to google the definitive way to combine autotest, rspec, and spec-server, but to no avail. It seems like there are lots of suggestions from old versions. Furthermore, some commands such as rake:autotest don''t seem to be around anymore. So, is it required to install ZenTest as a gem? I have version 3.9.1. I believe this gets me the autotest