On Mon, Jun 1, 2009 at 7:26 AM, mortench <[email protected]> wrote:
> Correction for last msg:
>
> before(:all) do
> �...@org_root_prop = java.lang.System.getProperty("root")
>
> # abort all examples and after action if condition is not meet:
> ensure_that !...@org_root_prop.nil? && @org_root_prop.strip.length>0
> end
You could do this check outside of the example? ie:
describe "...." do
def self.ensure_that(condition, &blk)
yield if condition
end
def self.root_property_is_not_blank
org_root_prop = java.lang.System.getProperty("root")
org_root_prop.nil? && org_root_prop.strip.length>0
end
ensure_that root_property_is_not_blank do
it "...." do
end
end
end
>
> /Morten
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Zach Dennis
http://www.continuousthinking.com (personal)
http://www.mutuallyhuman.com (hire me)
http://ideafoundry.info/behavior-driven-development (first rate BDD training)
@zachdennis (twitter)
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users