added rspec for condition