search for: spec_fil

Displaying 20 results from an estimated 22 matches for "spec_fil".

Did you mean: spec_file
2007 Apr 09
7
RCov results seem to include the spec files
I saw the RCov page at http://rspec.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...
2011 Apr 23
1
rake spec fails where rake spec:(models|controllers|views) pass
...llers they all pass. When I $ rake spec: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 f...
2008 Jul 09
2
Can I get RSpec NOT to abort rake on failing specs?
...Rake::Task.task_defined?("spec:#{task}") 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 = [...
2007 May 03
7
before method
Would it be desirable to have before and after take a spec name as well as :each and :all? Scott
2018 Mar 05
2
virt-v2v 1.38 fails to convert .vmx VM: setfiles ... Multiple same specifications for /.*.
[This email is either empty or too large to be displayed at this time]
2007 Jan 05
6
RSpec 0.7.5 with Rails and rcov
I seem to be missing something because I am at a loss on how to get rcov, RSpec, and Rails working together. Would someone mind dropping some hints?
2008 May 27
4
Failing rspec story not causing a CruiseControl.rb build to fail?
We''ve just added rspec stories to our CruiseControl.rb build. When there''s a failing scenario we see the failure in the log output, but it doesn''t cause the CruiseControl build to fail. We''ve also just upgraded to the latest rspec version, 1.1.4, which fixes rspec bug 228, but the CC.rb build is still passing. Has anyone got failing rspec stories making
2008 Mar 17
10
RSpec and RCov with JRuby
...est run. I have installed RCov without the C extensions. I tried it with a simple script and it worked (pretty slow, but it doesn?t matter). But when I add the rcov options to my Rake task, RCov is not invoke properly! Rakefile: Spec::Rake::SpecTask.new(''specs'') do |t| t.spec_files = FileList[''spec/**/*.rb''] t.rcov = true t.rcov_opts = [''--exclude'', ''spec''] t.verbose = true end Output: ... Finished in 11.376 seconds 187 examples, 0 failures, 10 pending Loaded suite /Users/tobias/bin/JRuby.framework/Current/bin...
2018 Mar 06
3
Re: virt-v2v 1.38 fails to convert .vmx VM: setfiles ... Multiple same specifications for /.*.
...es/file_contexts" "/" "force:true" guestfsd: => grep (0x97) took 0.12 secs guestfsd: <= selinux_relabel (0x1d3) request length 108 bytes commandrvf: stdout=n stderr=y flags=0x0 commandrvf: setfiles -m usage: setfiles [-diIDlmnpqvFW] [-e excludedir] [-r alt_root_path] spec_file pathname... usage: setfiles [-diIDlmnpqvFW] [-e excludedir] [-r alt_root_path] spec_file -f filename usage: setfiles -s [-diIDlmnpqvFW] spec_file usage: setfiles -c policyfile spec_file commandrvf: stdout=n stderr=y flags=0x0 commandrvf: setfiles -F -e /sysroot/dev -e /sysroot/proc -e /sysroot/...
2007 May 17
0
strange results when using rcov with rspec
...am using looks like this: desc "Run the specs under vendor/plugins/**/spec/models" Spec::Rake::SpecTask.new(:models => "db:test:prepare") do |t| t.spec_opts = [''--options'', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList["vendor/plugins/#{ENV[''PLUGIN''] || "**"}/spec/models/*_spec.rb"] t.rcov = true t.rcov_dir = "spec/reports/model-coverage" t.rcov_opts = [''--include-file'', "vendor\/plugins\/#{ENV ['...
2009 Feb 20
6
How to mock an object defined in the before_filter function?
...def destroy @destroy_id = @comment.id #to be used in rendering partial @comment.destroy respond_to do |format| format.js end end def find_comment @comment = Comment.find(:first, :conditions => [''id= ?'',params [:comment_id]]) end ===============spec_file spec code describe CommentsController, "while deleting a comment" do it "should render destroy.rjs in case of success" do @comment = mock_model(Comment) @comment.stub!(:id).and_return(1) @comment.stub!(:destroy).and_return(:true) controller.stub!(:find_commen...
2007 May 10
1
RSpec 0.9.4
...=== Windows users - if you want screenshots === gem install win32screenshot Install RMagick (special install procedure) == Configure == === Rakefile === require ''spec/rake/spectask'' desc "Run UI Specs" Spec::Rake::SpecTask.new(''spec:ui'') do |t| t.spec_files = FileList[''spec/**/*.rb''] t.spec_opts = [ ''--require'', ''spec/spec_helper'', ''--format'', ''Spec::Ui::ScreenshotFormatter:spec_report.html'', ''--format'', ''progress'...
2009 Apr 22
1
Tests for my gem cannot find classes in gems lib directory ..
...-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[''spec/*_spec.rb''] end and my spec describe Foo do end The error I get ./spec/Foo_spec.rb:1: uninitialized constant Foo (NameError) from /Library/Ruby/Gems/1.8/gems/rspec-1.2.4/lib/spec/runner/ example_group_runner.rb:15:in `load'' from /Library/Ruby...
2007 Aug 10
3
Using rcov and ouput to screen
I''d like to output my rcov data to the screen in ascii instead of html...is that possible using the rake spec:rcov command? Also, is there somewhere that will allow me to search the mail archives...I''m pretty sure someone else has asked similar questions. Thanks for the help. Mike B. ---------------------------------------------------------------- This message was sent
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
2007 Aug 10
0
(no subject)
...pec_on_rails/tasks/rspec.rake and in this section of code: desc "Run all specs in spec directory with RCov (excluding plugin specs)" Spec::Rake::SpecTask.new(:rcov) do |t| t.spec_opts = [''--options'', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList[''spec/**/*_spec.rb''] t.rcov = true t.rcov_opts = [''--exclude'', ''spec'', ''--rails''] end Change this: t.rcov_opts = [''--exclude'', ''spec'', ''--rails''...
2007 Feb 23
0
Using rspec_on_rails without a test
...not have db:test:prepare as a dependency: namespace :spec do desc "Run the specs under spec/models without a database" Spec::Rake::SpecTask.new(:models_no_db) do |t| t.spec_opts = [''--options'', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList[''spec/models/**/*_spec.rb''] end end 2. Calling an error on access the database with a new helper: ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/ environment") require ''spec/rails...
2007 Jul 26
3
Canonical way to generate RSpec HTML report in Rails app
Hi! I was just wondering how you typically generate a spec HTML report in a Rails app. Currently I''m doing something like this: spec spec -f h:spec/spec_report.html But that seems sort of clumsy and I would have thought that there was a rake task for it. Have I overlooked something? Thanks! Peter ---------------------------- Peter Marklund Garvar Lundins Gr?nd 7 11220 Stockholm
2007 Apr 17
7
rspec with CI
I am a bit of a rails and rspec noob. I am trying to use rspec in conjunction with CruiseControlrb. When I run a cruise build having spec errors, the build does not indicate a failure. I have tried to track down why this is the case, and my best guess is that the spec task is kicking off the spec via a ruby() method in rake, and that ruby method does not propagate my spec failure back to
2007 Sep 04
7
Rake tasks getting in the way of edge (uses gem instead)
So I''d been running gem releases of rspec for the past several months, and I installed edge rspec so that I can use Story Runner. I''m running into a problem because I''ve got a couple rake tasks that reference "spec/rake/raketask". If I try to run "rake spec" then it pulls in the gem version instead of the plugin version. rake blows up saying that