spec/motion/mail/mail_spec.rb in bubble-wrap-1.9.5 vs spec/motion/mail/mail_spec.rb in bubble-wrap-1.9.6

- old
+ new

@@ -50,80 +50,82 @@ message: "This is my message. It isn't very long.", animated: false } end - it "should determine if the device can send mail or not" do - [true, false].include? BW::Mail.can_send_mail?.should == true - end + if BW::Mail.can_send_mail? || Device.ios_version.to_f < 10.0 + it "should determine if the device can send mail or not" do + [true, false].include?(BW::Mail.can_send_mail?).should == true + end - it "should open the mail controller in a modal" do - @view_controller.expectation = lambda { |mail_controller, animated| - mail_controller.should.be.kind_of(MFMailComposeViewController) - } + it "should open the mail controller in a modal" do + @view_controller.expectation = lambda { |mail_controller, animated| + mail_controller.should.be.kind_of(MFMailComposeViewController) + } - BubbleWrap::Mail.compose @standard_mail_options - end + BubbleWrap::Mail.compose @standard_mail_options + end - it "should create a mail controller with the right to: address set" do - @view_controller.expectation = lambda { |mail_controller, animated| - mail_controller.toRecipients.should.be.kind_of(Array) - mail_controller.toRecipients.should == @standard_mail_options[:to] - } + it "should create a mail controller with the right to: address set" do + @view_controller.expectation = lambda { |mail_controller, animated| + mail_controller.toRecipients.should.be.kind_of(Array) + mail_controller.toRecipients.should == @standard_mail_options[:to] + } - BubbleWrap::Mail.compose @standard_mail_options - end + BubbleWrap::Mail.compose @standard_mail_options + end - it "should create a mail controller with the right cc: address set" do - @view_controller.expectation = lambda { |mail_controller, animated| - mail_controller.ccRecipients.should.be.kind_of(Array) - mail_controller.ccRecipients.should == @standard_mail_options[:cc] - } + it "should create a mail controller with the right cc: address set" do + @view_controller.expectation = lambda { |mail_controller, animated| + mail_controller.ccRecipients.should.be.kind_of(Array) + mail_controller.ccRecipients.should == @standard_mail_options[:cc] + } - BubbleWrap::Mail.compose @standard_mail_options - end + BubbleWrap::Mail.compose @standard_mail_options + end - it "should create a mail controller with the right bcc: address set" do - @view_controller.expectation = lambda { |mail_controller, animated| - mail_controller.bccRecipients.should.be.kind_of(Array) - mail_controller.bccRecipients.should == @standard_mail_options[:bcc] - } + it "should create a mail controller with the right bcc: address set" do + @view_controller.expectation = lambda { |mail_controller, animated| + mail_controller.bccRecipients.should.be.kind_of(Array) + mail_controller.bccRecipients.should == @standard_mail_options[:bcc] + } - BubbleWrap::Mail.compose @standard_mail_options - end + BubbleWrap::Mail.compose @standard_mail_options + end - it "should create a mail controller with the right subject: set" do - @view_controller.expectation = lambda { |mail_controller, animated| - mail_controller.subject.should.be.kind_of(String) - mail_controller.subject.should == @standard_mail_options[:subject] - } + it "should create a mail controller with the right subject: set" do + @view_controller.expectation = lambda { |mail_controller, animated| + mail_controller.subject.should.be.kind_of(String) + mail_controller.subject.should == @standard_mail_options[:subject] + } - BubbleWrap::Mail.compose @standard_mail_options - end + BubbleWrap::Mail.compose @standard_mail_options + end - it "should create a mail controller with the right message: set" do - @view_controller.expectation = lambda { |mail_controller, animated| - mail_controller.message.should.be.kind_of(String) - mail_controller.message.should == @standard_mail_options[:message] - } + it "should create a mail controller with the right message: set" do + @view_controller.expectation = lambda { |mail_controller, animated| + mail_controller.message.should.be.kind_of(String) + mail_controller.message.should == @standard_mail_options[:message] + } - BubbleWrap::Mail.compose @standard_mail_options - end + BubbleWrap::Mail.compose @standard_mail_options + end - it "should create a mail controller with the right html: set" do - @view_controller.expectation = lambda { |mail_controller, animated| - mail_controller.html.should == @standard_mail_options[:html] - } + it "should create a mail controller with the right html: set" do + @view_controller.expectation = lambda { |mail_controller, animated| + mail_controller.html.should == @standard_mail_options[:html] + } - BubbleWrap::Mail.compose @standard_mail_options - end + BubbleWrap::Mail.compose @standard_mail_options + end - it "should create a mail controller with the right animation" do - @view_controller.expectation = lambda { |mail_controller, animated| - animated.should.be.false - } + it "should create a mail controller with the right animation" do + @view_controller.expectation = lambda { |mail_controller, animated| + animated.should.be.false + } - BubbleWrap::Mail.compose @standard_mail_options + BubbleWrap::Mail.compose @standard_mail_options + end end end end