Sha256: 027b52808cb471f5cc9f09d26b4dec00ab9721a165e70a7c28eac5bbc2c5ba79

Contents?: true

Size: 458 Bytes

Versions: 9

Compression:

Stored size: 458 Bytes

Contents

require "spec_helper"

describe UniformNotifier::JavascriptAlert do
  it "should not notify message" do
    UniformNotifier::JavascriptAlert.inline_notify("javascript alert!").should be_nil
  end

  it "should notify message" do
    UniformNotifier.alert = true
    UniformNotifier::JavascriptAlert.inline_notify("javascript alert!").should == <<-CODE
<script type="text/javascript">/*<![CDATA[*/
alert( "javascript alert!" );
/*]]>*/</script>
CODE
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
uniform_notifier-1.5.0 spec/uniform_notifier/javascript_alert_spec.rb
uniform_notifier-1.4.0 spec/uniform_notifier/javascript_alert_spec.rb
uniform_notifier-1.3.0 spec/uniform_notifier/javascript_alert_spec.rb
uniform_notifier-1.2.0 spec/uniform_notifier/javascript_alert_spec.rb
uniform_notifier-1.1.1 spec/uniform_notifier/javascript_alert_spec.rb
uniform_notifier-1.1.0 spec/uniform_notifier/javascript_alert_spec.rb
uniform_notifier-1.0.2 spec/uniform_notifier/javascript_alert_spec.rb
uniform_notifier-1.0.1 spec/uniform_notifier/javascript_alert_spec.rb
uniform_notifier-1.0.0 spec/uniform_notifier/javascript_alert_spec.rb