Created
June 24, 2010 22:01
-
-
Save ideasasylum/452055 to your computer and use it in GitHub Desktop.
This is how I use should_change macros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "Parsing example file" do | |
setup { | |
@xml = File.open(File.expand_path(File.dirname(__FILE__) + '/../EICK.xml'), 'r'){|f| f.read } | |
parse_hamweather_data(@xml) | |
} | |
should_change("the number of forecasts", :by => 8) {Forecast.count} | |
should_change("the number of current forecasts", :by => 1) {Forecast.count :conditions => 'current = true'} | |
should_change("the number of 3hour forecasts", :by => 7) {Forecast.count :conditions => 'priority = 2'} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment