rspec-cells 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  .idea/
2
2
  Gemfile.lock
3
- *.gem
3
+ *.gem
4
+ /.rvmrc
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ rvm: 1.9.2
2
+ script: "bundle exec rspec -f documentation"
3
+ notifications:
4
+ irc: "irc.freenode.org#cells"
data/CHANGES.textile CHANGED
@@ -1,3 +1,8 @@
1
+ h2. 0.1.0
2
+
3
+ h3. Changes
4
+ * Removed @ViewAssigns@. Maintenance Release.
5
+
1
6
  h2. 0.0.5
2
7
 
3
8
  h3. Changes
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem 'cells', :path => "../cells"
data/README.rdoc CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  <em>Spec your Cells.</em>
4
4
 
5
+ {<img src="https://secure.travis-ci.org/apotonick/rspec-cells.png" />}[http://travis-ci.org/apotonick/rspec-cells]
6
+
5
7
  This plugin allows you to test your cells easily using RSpec. Basically, it adds a cells example group with a <tt>#render_cell</tt> helper.
6
8
 
7
9
  Cells is Rails' popular {view components framework}[http://github.com/apotonick/cells].
data/Rakefile CHANGED
@@ -1,2 +1,7 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
+ require 'rspec/core/rake_task'
4
+
5
+ desc "Run all specs"
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task :default => :spec
@@ -1,6 +1,6 @@
1
1
  module RSpec # :nodoc:
2
2
  module Cells # :nodoc:
3
- VERSION = '0.0.5'
3
+ VERSION = '0.1.0'
4
4
  end
5
5
  end
6
6
 
@@ -6,7 +6,6 @@ module RSpec::Rails
6
6
 
7
7
  include RSpec::Rails::RailsExampleGroup
8
8
  include Cell::TestCase::TestMethods
9
- include RSpec::Rails::ViewRendering
10
9
 
11
10
  if defined?(Webrat)
12
11
  include Webrat::Matchers
@@ -52,7 +51,6 @@ module RSpec::Rails
52
51
  end
53
52
 
54
53
  # we always render views in rspec-cells, so turn it on.
55
- render_views
56
54
  subject { controller }
57
55
  end
58
56
 
data/rspec-cells.gemspec CHANGED
@@ -21,5 +21,5 @@ Gem::Specification.new do |s|
21
21
 
22
22
  s.add_runtime_dependency(%q<rails>, ["~> 3.0"])
23
23
  s.add_runtime_dependency(%q<rspec-rails>, ["~> 2.2"])
24
- s.add_runtime_dependency(%q<cells>, ["~> 3.4"])
24
+ #s.add_runtime_dependency(%q<cells>, ["~> 3.4"])
25
25
  end
@@ -1,20 +1,42 @@
1
1
  require 'spec_helper'
2
+ require 'cells'
3
+
4
+ class DummyCell < Cell::Base
5
+ def show
6
+ "I'm Dummy."
7
+ end
8
+
9
+ def update(what)
10
+ "Updating #{what}."
11
+ end
12
+ end
13
+
2
14
 
3
15
  module RSpec::Rails
4
-
16
+
5
17
  describe CellExampleGroup do
6
18
  let(:group) do
7
19
  RSpec::Core::ExampleGroup.describe do
8
20
  include CellExampleGroup
9
21
  end
10
22
  end
11
-
23
+
12
24
  it "adds :type => :cell to the metadata" do
13
25
  group.metadata[:type].should eq(:cell)
14
26
  end
15
27
 
16
- it "responds to #render_cell" do
17
- group.new.should respond_to(:render_cell)
28
+ describe "#render_cell" do
29
+ it "renders a state" do
30
+ group.new.render_cell(:dummy, :show).should == "I'm Dummy."
31
+ end
32
+
33
+ it "allows passing state args" do
34
+ group.new.render_cell(:dummy, :update, "this").should == "Updating this."
35
+ end
36
+ end
37
+
38
+ it "responds to #cell" do
39
+ group.new.cell(:dummy).should be_kind_of(DummyCell)
18
40
  end
19
41
  end
20
42
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 1
7
8
  - 0
8
- - 5
9
- version: 0.0.5
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nick Sutterer
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-05-17 00:00:00 +02:00
17
+ date: 2011-10-04 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -45,20 +45,6 @@ dependencies:
45
45
  version: "2.2"
46
46
  type: :runtime
47
47
  version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: cells
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ~>
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 3
58
- - 4
59
- version: "3.4"
60
- type: :runtime
61
- version_requirements: *id003
62
48
  description: Use render_cell in your specs.
63
49
  email:
64
50
  - apotonick@gmail.com
@@ -70,6 +56,7 @@ extra_rdoc_files: []
70
56
 
71
57
  files:
72
58
  - .gitignore
59
+ - .travis.yml
73
60
  - CHANGES.textile
74
61
  - Gemfile
75
62
  - MIT-LICENSE