Displaying 20 results from an estimated 40000 matches similar to: "Speccing a rake task"
2009 Nov 02
0
testing Rake tasks with FakeFS
Jake Benilov wrote:
> Hello Ben,
>
Hi Jake,
I hope you don''t mind but I am copying this response to the rspec-users
list in case any one else is able to shed more light on it.
> I have a bit of a newbie question regarding fakefs; I want to test Rake
> tasks using fakefs and rspec:
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> require
2008 Jan 08
2
Problems with rspec 1.1 required inside rake tasks
This is interesting.
The default rspec rake tasks generated by Hoe give you an rspec.rake
file that looks like:
> begin
> require ''spec''
> rescue LoadError
> require ''rubygems''
> require ''spec''
> end
>
So far so good.
When you invoke rake to do something, say check_manifest
> rake check_manifest
>
You
2007 Oct 05
0
RSpec Trunk - Successful : Rake Aborted
$ rake spec --trace
(in /work/workspace/ng)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:test:prepare
** Invoke db:test:clone (first_time)
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute
2009 Apr 30
1
rake spec - no output
rake spec does not seem to be doing anything. Could it be a problem with
ruby 1.9? Here is what I did:
rails rspec-test
cd rspec-test
test.rb: config.gem "rspec", :lib => false, :version => ">= 1.2.0"
test.rb: config.gem "rspec-rails", :lib => false, :version => ">= 1.2.0"
ruby script/generate rspec
ruby script/generate rspec_scaffold
2007 Nov 21
6
failing rake task
I''m running rspec and rspec on rails in svn external so I am running
the latest version of the trunk. Recently the rake spec task started
braking the continuous integration server because the rake aborted. I
checked my local and it ran with the same behavior.. and all of the
devs on my team are now experiencing the same problem. All the spec''s
are passing, but the rake task is
2007 Dec 26
2
How to set environment when calling rake task inside another
This is what I have inside a rake task. In this rake task I need to call
another rake task called email:send_messages. However I need to pass the
RAILS_ENV as ''staging''.
Rake::Task["rake:email:send_messages"].invoke
I tried a lot of variations but none of them work.
Rake::Task["rake:email:send_messages"].invoke RAILS_ENV=staging
2010 Nov 03
3
Rake task for focused examples
Hi,
Is it possible to make a rake task to run examples with a certain
filter on? In this case I want to run rake spec:focused and run only
the examples with :focus => true.
- Toni
2009 Feb 03
3
Rcov - Specifying rake tasks
I am trying to get a customized rcov rake task working. What I have so
far looks like this:
desc "Rcov code coverage reports"
require ''rcov/rcovtask''
require ''spec/rake/spectask''
require ''cucumber/rake/task''
task :rcov => "rcov:all"
namespace :rcov do
Rcov::RcovTask.new(:all) do
task :rcov =>
2008 Apr 08
2
Can you add an option to select the ruby interpreter for rake task?
Hi all,
My problem is that I''ve installed both ruby 1.8 (as ruby) and
ruby 1.9 (as ruby1.9) on my system. I use spec/rake/spectask for
my Rakefile. But the generated command is
ruby -I.. blabla
it should be "ruby1.9 -I... blabla", but after look at the code
of spectask.rb, I found this line:
==> cmd = "ruby "
rb_opts = ruby_opts.clone
2007 Mar 21
2
ORA-03106: fatal two-task communication protocol error
Has anyone encountered this error or know how to correct it?
I couldn''t find any Rails-specific info about this on google.
Here are the circumstances:
/usr/local/bin/ruby --version
ruby 1.8.4 (2005-12-24) [i686-linux]
/usr/local/bin/rails --version
Rails 1.1.6
## Create mcd app
rails mcd -d oracle
cd mcd
## Create oracle tablespace & user
sqlplus ''/ as
2008 Mar 06
0
rake spec aborting
hello,
when running rake spec, I''m getting a stack trace similar to the one
mentioned in this ticket, which has been resolved:
http://rspec.lighthouseapp.com/projects/5645/tickets/237
but from what I understood, if the project is using rspec 1.1.3 (as is
the case with mine), this shouldn''t be happening?
here''s the stack-trace:
rake aborted!
Command ruby
2007 Nov 01
0
Heckle rake task
Fellow hecklers,
Just spent a while getting this working. Turns out heckle will heckle
a whole module and sub-modules with one call, so with a bit of string
matching, you can build a nice tool to heckle your whole app and
report any failures.
Was going to post to the list, as the first version was about 4 lines
long, but I''ve embellished it slightly (I got carried away), so
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works
fine running scripts/spec, but when I run rake spec instead, I get:
ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM
service but no IM name should be invalid''
Mysql::Error: Cannot delete or update a parent row: a foreign key
constraint fails
2008 Nov 06
8
anyone able to explain logic behind "rake spec" startup (e.g. db:test:prepare => abort_if_pending_migration => invoke environment => etc etc)
anyone able to explain logic behind "rake spec" startup? i.e. the
below steps & why things occur when they do
Macintosh-2:myequity greg$ rake spec --trace
(in /Users/greg/source/myequity)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute
2010 Feb 25
0
Rails problems running rake and other tasks - undefined method `action_controller'
I suddenly have a major problem in all my Rails 3 apps:
$ rake db:migrate --trace
rake aborted!
Don''t know how to build task ''db:migrate''
/Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/
rake.rb:1728:in `[]''
/Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/
rake.rb:2050:in `invoke_task''
2010 Nov 08
0
Rails3: "rake test" task does not run tests.
Hello all,
I have a spiffy new rails3 app for which I can run tests individually,
but not via rake. Behold!
> $ ruby -Itest test/unit/test_user.rb
> Loaded suite test/unit/test_user
> Started
> .
> Finished in 0.466033 seconds.
>
> 1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
>
> Test run options: --seed 21789
and
> $ rake test:units --trace
> (in
2007 Apr 20
1
speccing a call to break
How can I spec that a method calls break? As far as I can see from
ri, break is a pure syntax element (not a method from Kernel or
Object), so I''m not sure what to mock...
E.g.:
class SomeClass
def a_method
loop do
break
end
end
end
Scott
P.S. Sorry for the annoying questions, but I just want to know!
P.P.S: What is the right form of the verb "to spec" in
2011 Apr 23
1
rake spec fails where rake spec:(models|controllers|views) pass
I''m still trying to work into Ruby 1.9.2 and am now experiencing
something that makes no sense to me. Using rspec 1.3.2 and rspec-rails
1.3.4 with rails 2.3.11 on ruby 1.9.2-p180, when I
$ rake spec:models
they all pass. When I
$ rake spec:controllers
they all pass. When I
$ rake spec:views
they all pass. But when I
$ rake spec
I get
<path to
2008 Jul 09
2
Can I get RSpec NOT to abort rake on failing specs?
At work we''ve got a rather complex app with both specs and tests. Our
default rake task runs all our our tests and specs. We''ve also got separate
rake tasks to run groups of tests and specs in the various subdirectories.
The default task simply lists all the individual tasks as pre-reqs.
We do a lot of branching and merging, so we really want to run all of the
tests and specs
2007 Oct 18
0
rake spec:models failing
Hi there,
I''m having trouble with `rake spec:models`. It''s failing on:
- 1 old rspec/rails project
- all new rspec/rails projects
But, it *is* working fine on my other (older) rspec/rails projects. All
projects are on rspec & rails 1.0.8, Rails 1.2.3, os X ppc
Here''s a fresh rspec/rails project with failing rake task
$ rails test_app -d postgresql
$ cd