jko170 wrote:
> There is also the excellent email_spec gem:
>
> http://github.com/bmabey/email-spec/
Continuing with the topic but scenario is different:
I had written a rake task in rspec.rake.What i want is after running the
task i should get an email
So for that i have created a method in app/models/notifier.rb which is
as follows:
def sanity
@recipients = "[email protected]"
@subject = "Sanity"
end
Now in the rake task i am calling the method which is a follows (I am
writing this rake task under rspec.rake):
desc "Sanity testing"
Spec::Rake::SpecTask.new(:sanity) do |t|
# t.spec_opts = ["--format", "specdoc", "--dry-run"]
t.spec_files = FileList['spec/models/sanity_spec.rb']
Notifier.deliver_sanity
end
But if i run the task it says "uninitialized constant Notifier" .If i
comment the notifier line then my rake task is working fine.
May be it is not getting the model.So do i need to add the model or some
configuration need to be done
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users