mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-25 01:31:37 +08:00
Add sim_close rake task; fix specs
This commit is contained in:
6
Rakefile
6
Rakefile
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user