April 2012
16 posts
Ruby: "&&" and "||" > "and" and "or" →
Who knew!!
6 tags
More on RSpec and Rake
Here’s a simple way to specify load order using rake and rspec…
With files:
RSpec::Core::RakeTask.new(:spec) do |task|
task.pattern = [ "./spec/fileone_spec.rb", "./spec/filetwo_spec.rb" ]
end
With directories:
RSpec::Core::RakeTask.new(:spec) do |task|
task.pattern = [ "./spec/dirone", "./spec/dirtwo" ]
end
RSpec2 and Rake →
I was looking for the following and found it here…
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
4 tags
rSpec -- testing protected and private methods
Add the following to the top of your _spec file…
before(:each) do
MyClass.send(:public, *MyClass.protected_instance_methods)
MyClass.send(:public, *MyClass.private_instance_methods)
end
EOM
3 tags
3 tags
3 tags
2 tags
[PMV] My Little Wu-Tang Clan - Shame on a Nigga →
That last pic of my daughter fondly made me think of this vid.