Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50135ad
commit 8bddfd9
Showing
6 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
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
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
6 changes: 3 additions & 3 deletions
6
vendor/plugins/silverline/spec/silverline/essential/generator_spec.rb
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
45 changes: 45 additions & 0 deletions
45
vendor/plugins/silverline/spec/silverline/essential/html_spec.rb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
require File.dirname(__FILE__) + '/../../spec_nonrails.rb' | ||
|
||
Silverline.instance_eval{remove_const :Essential} if defined?(Silverline::Essential) | ||
Silverline::Essential = Module.new | ||
|
||
load 'silverline/essential/html.rb' | ||
|
||
Object.instance_eval{remove_const :HtmlTesttHost} if defined? HtmlTesttHost | ||
HtmlTesttHost = Class.new | ||
HtmlTesttHost.class_eval { include Silverline::Essential::Html } | ||
|
||
describe Silverline::Essential::Html do | ||
|
||
before(:each) do | ||
@html = HtmlTesttHost.new | ||
end | ||
|
||
it "should render a silverlight include tag" do | ||
@html.should_receive(:templatify).with("head.html.erb", anything) | ||
@html.silverlight_include_tag | ||
end | ||
|
||
it "should render a silverlight control" do | ||
@html.should_receive(:require).with('erb') | ||
@html.stub!(:public_xap_file).and_return "/public.xap" | ||
@html.stub!(:generate_init_params).and_return "debug=true" | ||
result = @html.silverlight_object | ||
result['position: absolute'].should_not be_nil | ||
result['<object'].should_not be_nil | ||
result['data="data:application/x-silverlight'].should_not be_nil | ||
result['type="application/x-silverlight-2-b2"'].should_not be_nil | ||
result['<param name="source" value="/public.xap" />'].should_not be_nil | ||
result['width="1" height="1"'].should_not be_nil | ||
result['<param name="initParams" value="debug=true" />'].should_not be_nil | ||
end | ||
|
||
end | ||
|
||
describe "Private functionality of essential HTML" do | ||
it "should know the HTTP_HOST" | ||
it "should generate initParams for Silverlight and the DLR" | ||
it "should know the XAP file location" | ||
it "should know how to put JSON in initParams" | ||
it "should know how to render a template" | ||
end |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
|
||
require 'rubygems' | ||
require 'ruby-debug' | ||
Debugger.start | ||
#Debugger.start |