Displaying 20 results from an estimated 48 matches for "_spec".
Did you mean:
spec
2011 Apr 23
1
rake spec fails where rake spec:(models|controllers|views) pass
...:views
they all pass. But when I
$ rake spec
I get
<path to
gem>/activesupport-2.3.11/lib/active_support/dependencies.rb:177: stack
level too deep (SystemStackError)
I''ve been tinkering around with the rake file, and when I change
t.spec_files = FileList[''spec/**/*_spec.rb'']
in the default task to hit just one of the subdirectories, such as
t.spec_files = FileList[''spec/models/**/*_spec.rb'']
then rake spec works. I''ve done this for models, controllers, and views,
and rake spec works fine for each. But including all of the...
2007 Oct 03
4
TextMate language weirdness
I''m having trouble with TextMate and assigning the RSpec language to
*_spec.rb files within rails projects. Here is what is happening:
I''m in a file that has the language "Ruby on Rails" selected.
I do a ctrl-shift-down to switch to the corresponding _spec.rb file.
The _spec.rb file has the language "Ruby on Rails" selected.
I change the lang...
2007 Sep 03
20
Reason for _spec.rb convention
Hi
Easy one - I just wondered why all spec files for rspec_on_rails end
"_spec.rb" instead of just ".rb"? They are all inside the spec
folder so surely the fact they are specs is implicit?
Ashley
2010 Nov 06
2
Custom File List for Rails 3 Spec Task
...h was usually generated with a glob pattern and an explicit call to Dir.glob). Now it only takes a glob pattern:
http://rdoc.info/github/rspec/rspec-core/master/RSpec/Core/RakeTask#pattern-instance_method
So how am I supposed to express the following in one glob pattern?
Dir.glob("spec/**/*_spec.rb") - Dir.glob("spec/javascript/**/*_spec.rb")
Or is there a better way that I''m missing entirely,
Best,
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20101106/9b2099ac/a...
2007 Apr 09
7
RCov results seem to include the spec files
...rubyforge.org/tools/rcov.html and
decided to add it to my project. My rakefile looks like this:
require "rake"
require "spec/rake/spectask"
desc "Run all specs with RCov"
Spec::Rake::SpecTask.new("spec:rcov") do |t|
t.spec_files = FileList["spec/**/*_spec.rb"]
t.rcov = true
end
When I run rake spec:rcov, it runs the specs using RCov and generates
the reports, but it''s including all my spec files as well.
At the very bottom I''ll see stuff like
spec/models/user_spec.rb 89 73 100.0%
it even includes spec_helper.rb...
2008 May 27
8
new --pattern option
...I did not want to include and they weren''t included with
previous versions. For example, it is going to load all rb files from "."
and from "some_dir" and subdirectories. What''s wrong and how can I avoid
that?
I made simple test, created files called "main_spec.rb" to follow your
naming convention. It had only one line in it:
puts "spec: " + File.dirname(__FILE__)
Now, I executed spec without -p (--pattern) switch to have it to use default
option (which is **/*_spec.rb). Everything worked as with version 1.08. But
NOW, if I executed spec w...
2007 May 24
15
Specs for code stored in rails_app/lib/
Where should the specs go for code in the "lib" directory of a Rails
app?
I made a folder, "spec/lib/", for storing such specs, and RSpec
automatically picks them up when run using "rake spec".
Before I go ahead and patch rspec_on_rails/lib/autotest/
rails_rspec.rb so that autotest can monitor these specs I''d like to
ask whether this is the
2007 Apr 11
5
Default exclude pattern in 0.9.0
The "rspec" rake task collects all _spec files in the spec directory,
and excludes the "watir" directory.
Is this indicating a preference for using Watir over Selenium? I would
like it better to standardize on something more neutral, ''ui'' perhaps?
/Marcus
--
Marcus Ahnve
http://marcus.ahnve.net
2011 Apr 30
1
[rspec-rails] Is it bad form to use spec/requests/*_spec.rb for integration tests?
So I wanted to cook up a quick integration test for something, and I''m
using rspec. I personally just don''t like Cucumber - just a personal
preference, not a slam to the test framework at all - and wanted to
stick to just pure rspec. So I dumped a quick spec file in spec/
reqests and ran it, and of course everything works.
But is this considered bad form, or a less-than-good
2007 Apr 13
21
ZenTest autotest now handles RSpec, yay!
Josh Knowles http://joshknowles.com/ just let me know that ZenTest Autotest
3.50 now handles your RSpec specs.
http://blog.zenspider.com/archives/2007/04/zentest_version_350_has_been_released.html
That''s a great news.
Josh also shared with me a quick hack to make autotest work with only the
RSpec plugin installed.
Add the following into your ~/.autotest file
2011 Oct 16
1
Ignoring certain files?
Hey guys,
Is there any way I can get rspec to ignore all files in spec/fixtures when
it does a recursive search for all spec/**/*_spec.rb files?
The problem I''m facing is that the fixtures for my code are project
structures on disk, so I thought I''d make a spec/fixtures with a bunch of
different project structures. That works, except obviously those can contain
_spec.rb files, which rspec picks up when I try...
2008 Jul 09
2
Can I get RSpec NOT to abort rake on failing specs?
...k}")
desc "Run the specs under spec/#{task}"
Spec::Rake::SpecTask.new(task) do |t|
t.fail_on_error = false
t.spec_opts = [''--options'', "\"#{RAILS_ROOT}/spec/spec.opts\""]
t.spec_files = FileList["spec/#{task}/*_spec.rb"]
end
namespace(task) do
Spec::Rake::SpecTask.new(:rcov) do |t|
t.fail_on_error = false
t.spec_opts = [''--options'', "\"#{RAILS_ROOT}/spec/spec.opts\""]
t.rcov_opts = [''--include'', "\&qu...
2011 Jul 05
4
Problem of "rake spec"
Hi all,
I am a bit confused when i type rake spec and it gives me this
message,
No examples matching ./spec/**/*_spec.rb could be found
what is that mean that something is not found.
and where i can input my the test code because i did have a tiny
sample code in user_controller_test.rb.
is that the right place to test functional..
plz give me a help
thanks
--
You received this message because you are subscr...
2007 Jan 19
2
rake spec:views
rake spec:views does not run the specs in my views folder. I can run
them with spec <path>. Is there something I missed?
---Brian Yamabe
2008 Jan 31
4
RSpec-1.1.3
RSpec-1.1.3 has been released.
If you''re using RSpec and autotest, you''ll have to upgrade to
RSpec-1.1.3 and ZenTest-3.9.0 at the same time.
== Version 1.1.3
Maintenance release.
* Tightened up exceptions list in autotest/rails_spec. Closes #264.
* Applied patch from Ryan Davis for ZenTest-3.9.0 compatibility
* Applied patch from Kero to add step_upcoming to story listeners. Closes #253.
* Fixed bug where the wrong named error was not always caught by
"should raise_error"
* Applied patch from Luis Lavena: No coloured...
2007 Oct 23
10
How is everyone structuring stories?
Bleeding-edge story-writers,
How are you structuring your specs?
I am working on a new project and tried this:
./lib
./blah
./spec
./blah
./stories
But it breaks autotest, so I moved stories parallel to lib and spec.
Also what about suffixes?
I have adopted "xyz_story_spec.rb", and "xyz.story" for the time
being, with the line
runner = Spec::Story::Runner::PlainTextStoryRunner.new(
File.expand_path(__FILE__).gsub("_story_spec.rb",
".story")
)
in the former. Simple to make TextMate recognise the RS...
2007 Sep 05
4
Content assist for spec files
...#39;'s extending ActionView::Base, so all the methods on that class
(and included modules and such) all become available as methods you
can call from the view. I was wondering if there was a similar class,
or set of Modules, that I can use to simulate the context for the
code inside the _spec.rb file.)
-- Tor
2006 Nov 07
3
include Helper in context?
Brandon,
can you get your Helpers to work in rspec 0.7 ? I''m including them in
the context but the render fails to see it.
If you have it working, I''ll go back and bang my head against it some
more, otherwise I''ll file a bug!
Many thanks,
Jerry
context "account/login (view)" do
include StandardHelpers
specify ''displays title
2008 Jun 02
1
Getting annotations in spec files.
Hi,
I just noticed that `rake notes` in rails 2.0.2 doesn''t check `spec`
directory. So, what I annotated with "FIXME", "TODO" and "OPTIMIZE" on
*_spec.rb are discarded.
Is there any quick way to `rake notes` task to check `spec` directory?
-T
2007 Oct 15
1
TextMate File Type Detection for RSpec & Rails
For those of you struggling with TextMate not properly detecting
rspec files, Allan Odgaard (the author of TextMate) has kindly
provided a tutorial on how to set up TextMate to associate all .rb
files with rails and all _spec.rb files with rspec.
http://macromates.com/blog/2007/file-type-detection-rspec-rails
His instructions work great and switching between rspec and rails
files has never been easier.
Carl