Add sim_close rake task; fix specs

This commit is contained in:
Silas J. Matson
2013-07-03 09:54:14 -07:00
parent 75b5a0ab82
commit a413af830f
2 changed files with 7 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ namespace :spec do
spec_files -= functional_files
App.config.instance_variable_set("@spec_files", spec_files)
Rake::Task["simulator"].invoke
Rake::Task["spec:sim_close"].invoke
end
task :func do
@@ -52,5 +53,10 @@ namespace :spec do
spec_files -= unit_files
App.config.instance_variable_set("@spec_files", spec_files)
Rake::Task["simulator"].invoke
Rake::Task["spec:sim_close"].invoke
end
task :sim_close do
sh "osascript -e 'tell application \"iphone simulator\" to quit'"
end
end

View File

@@ -13,7 +13,7 @@ describe "PM::Delegate" do
it "should handle push notifications" do
@subject.mock!(:on_push_notification) do |notification|
@subject.mock!(:on_push_notification) do |notification, was_launched|
notification.should.be.kind_of(PM::PushNotification)
notification.alert.should == "Eating Bacon"
notification.badge.should == 42