flutie 1.3.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/server.rb DELETED
@@ -1,21 +0,0 @@
1
- require 'rubygems'
2
- require 'sinatra'
3
- require 'sass'
4
-
5
- set :views, ['app/views']
6
- set :static, true
7
-
8
- helpers do
9
- def stylesheet_link_tag(name)
10
- "<link href='/stylesheets/#{name}.css' media='all' rel='Stylesheet' type='text/css' />"
11
- end
12
- end
13
-
14
- get '/' do
15
- erb :"flutie/styleguides/show", :layout => :"layouts/flutie"
16
- end
17
-
18
- get '/stylesheets/flutie.css' do
19
- content_type 'text/css', :charset => 'utf-8'
20
- scss :_flutie, :views => 'app/assets/stylesheets'
21
- end
@@ -1,62 +0,0 @@
1
- require 'spec_helper'
2
-
3
- ActionController::Base.prepend_view_path File.join(File.dirname(__FILE__), '..', '..', 'app', 'views')
4
- ActionController::Base.prepend_view_path File.join(File.dirname(__FILE__), '..', 'fixtures', 'app', 'views')
5
-
6
- shared_examples_for "Renders valid XML" do
7
- it "should render valid xml" do
8
- lambda { REXML::Document.new(response.body) }.should_not raise_error
9
- end
10
- end
11
-
12
- shared_examples_for "Renders styleguide partials" do
13
- it "should render styleguide partials" do
14
- response.body.should =~ %r{fixture partial 1}
15
- response.body.should =~ %r{fixture partial 2}
16
- end
17
- end
18
-
19
- shared_examples_for "Renders application layout" do
20
- it "should use application layout" do
21
- response.should render_template('layouts/application')
22
- end
23
- end
24
-
25
- shared_examples_for "Responds with success and renders show template" do
26
- it "should respond with success and render show template" do
27
- response.should be_success
28
- response.should render_template(:show)
29
- end
30
- end
31
-
32
- describe Flutie::StyleguidesController do
33
-
34
- render_views
35
-
36
- describe "GET to /styleguides/show" do
37
- before { get :show }
38
- it_should_behave_like "Responds with success and renders show template"
39
- it_should_behave_like "Renders valid XML"
40
- it_should_behave_like "Renders styleguide partials"
41
- it_should_behave_like "Renders application layout"
42
- end
43
-
44
- describe "GET to /styleguides/show with flutie=false" do
45
- before { get :show, :flutie => "false" }
46
- it_should_behave_like "Responds with success and renders show template"
47
- it_should_behave_like "Renders valid XML"
48
- it_should_behave_like "Renders styleguide partials"
49
- it_should_behave_like "Renders application layout"
50
- end
51
-
52
- describe "GET to /styleguides/show with flutie=true" do
53
- before { get :show, :flutie => "true" }
54
- it_should_behave_like "Responds with success and renders show template"
55
- it_should_behave_like "Renders valid XML"
56
- it_should_behave_like "Renders styleguide partials"
57
- it "should use flutie layout" do
58
- response.should render_template('layouts/flutie')
59
- end
60
- end
61
-
62
- end
@@ -1 +0,0 @@
1
- fixture partial 1
@@ -1 +0,0 @@
1
- fixture partial 2
@@ -1,7 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Flutie do
4
- it "should be valid" do
5
- Flutie.should be_a(Module)
6
- end
7
- end
@@ -1,16 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "initialize the rails app" do
4
- let(:expected) { { :flutie => ['/flutie/stylesheets/flutie'] } }
5
- if defined?(ActionView::Helpers::AssetTagHelper::StylesheetIncludeTag)
6
- it "should add flutie directory to the stylesheet include tag expansions" do
7
- ActionView::Helpers::AssetTagHelper::StylesheetIncludeTag.expansions.should == expected
8
- end
9
- else
10
- it "should add flutie directory to stylesheet expansion" do
11
- expected = { :flutie => ['/flutie/stylesheets/flutie'] }
12
- ActionView::Helpers::AssetTagHelper.send(:class_variable_get, :@@stylesheet_expansions).should == expected
13
- end
14
- end
15
- end
16
-
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Navigation" do
4
- include Capybara::DSL
5
-
6
- it "should be a valid app" do
7
- ::Rails.application.should be_a(Dummy::Application)
8
- end
9
- end