Permalink
Browse files

tests

  • Loading branch information...
1 parent 01bc8fc commit 231bda6c97cadbdc066e3bc4f6daaf50ccd1e159 Mikhail Gulin committed Feb 28, 2012
View
@@ -1,4 +1,7 @@
-lib/record_history.rb 9e9f54bec98f9af93f7705af3030af09197169a9
-lib/record_history/version.rb 7d6308d8b42ce82874c565499ca49b93332888df
+lib/record_history.rb 611a437d8b24383c5c0c2546729781adbcd6ab27
+lib/record_history/version.rb 90e089b872acdf89e213c185bf2af8d517cabe35
+lib/record_history/controller.rb 759fdb6a2032b34f4d56c4de974397b20934eb65
+lib/record_history/has_record_history.rb 754a5875d888c55f59ca779ff65041e9728c8b74
+lib/record_history/record_history_model.rb 04e5724250f9a4730fbbfabd2afdeedc29f6f23f
lib/generators/record_history/install_generator.rb c6b047fa8ee8c9d27fb9b89fca0e59f4703df978
-lib/generators/record_history/templates/create_record_histories.rb 55a6577f127614215f0d3155ff86f394d689d32b
+lib/generators/record_history/templates/create_record_histories.rb bb95e4efa19a3f60c9b37a8c876a948db7fac35b
Binary file not shown.
View
Binary file not shown.
View
@@ -2,3 +2,6 @@ source "http://rubygems.org"
# Specify your gem's dependencies in record_history.gemspec
gemspec
+gem "rspec-rails"
+gem "shoulda-matchers"
+gem "rspec-set"
View
@@ -1,18 +1,103 @@
PATH
remote: .
specs:
- record_history (0.0.1)
+ record_history (0.0.2)
+ activemodel
+ activerecord
+ activesupport
GEM
remote: http://rubygems.org/
specs:
+ actionpack (3.2.1)
+ activemodel (= 3.2.1)
+ activesupport (= 3.2.1)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.1)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.1)
+ activesupport (= 3.2.1)
+ builder (~> 3.0.0)
+ activerecord (3.2.1)
+ activemodel (= 3.2.1)
+ activesupport (= 3.2.1)
+ arel (~> 3.0.0)
+ tzinfo (~> 0.3.29)
+ activesupport (3.2.1)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ builder (3.0.0)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ factory_girl (2.6.0)
+ activesupport (>= 2.3.9)
+ faker (1.0.1)
+ i18n (~> 0.4)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.3)
+ json (1.6.5)
+ multi_json (1.1.0)
+ rack (1.4.1)
+ rack-cache (1.1)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ railties (3.2.1)
+ actionpack (= 3.2.1)
+ activesupport (= 3.2.1)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
redcarpet (1.17.2)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.8.0)
+ rspec-rails (2.8.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.8.0)
+ rspec-set (0.0.1)
+ rspec (>= 2)
+ shoulda-matchers (1.0.0)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.5)
+ thor (0.14.6)
+ tilt (1.3.3)
+ tzinfo (0.3.31)
yard (0.7.5)
PLATFORMS
ruby
DEPENDENCIES
+ factory_girl
+ faker
record_history!
redcarpet (~> 1.17)
+ rspec
+ rspec-rails
+ rspec-set
+ shoulda-matchers
+ sqlite3
yard (~> 0.7.5)
View
@@ -1,5 +1,20 @@
require "bundler/gem_tasks"
+require 'bundler'
+require 'rubygems'
+require 'rake'
+require 'rspec/core/rake_task'
+require 'factory_girl'
require 'yard'
YARD::Rake::YardocTask.new
+namespace :spec do
+ desc "Run unit specs"
+ RSpec::Core::RakeTask.new('unit') do |t|
+ t.pattern = 'spec/*_spec.rb'
+ end
+end
+
+desc "Run the unit and acceptance specs"
+task :spec => ['spec:unit']
+
@@ -174,17 +174,15 @@
<pre class="lines">
-14
-15
-16
-17</pre>
+18
+19
+20</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/generators/record_history/templates/create_record_histories.rb', line 14</span>
+ <pre class="code"><span class="info file"># File 'lib/generators/record_history/templates/create_record_histories.rb', line 18</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_down'>down</span>
- <span class='id identifier rubyid_remove_index'>remove_index</span> <span class='symbol'>:versions</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:item_id</span><span class='rbracket'>]</span>
- <span class='id identifier rubyid_drop_table'>drop_table</span> <span class='symbol'>:versions</span>
+ <span class='id identifier rubyid_drop_table'>drop_table</span> <span class='symbol'>:record_histories</span>
<span class='kw'>end</span></pre>
</td>
</tr>
@@ -214,21 +212,29 @@
9
10
11
-12</pre>
+12
+13
+14
+15
+16</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/generators/record_history/templates/create_record_histories.rb', line 2</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_up'>up</span>
<span class='id identifier rubyid_create_table'>create_table</span> <span class='symbol'>:record_histories</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_t'>t</span><span class='op'>|</span>
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='symbol'>:target_type</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_integer'>integer</span> <span class='symbol'>:target_id</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_integer'>integer</span> <span class='symbol'>:item_id</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
<span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='symbol'>:attr_name</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='symbol'>:old_value_dump</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='symbol'>:new_value_dump</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='symbol'>:author_type</span>
<span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_integer'>integer</span> <span class='symbol'>:author_id</span>
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='symbol'>:object</span>
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_datetime'>datetime</span> <span class='symbol'>:created_at</span>
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_datetime'>datetime</span> <span class='symbol'>:created_at</span>
<span class='kw'>end</span>
- <span class='id identifier rubyid_add_index'>add_index</span> <span class='symbol'>:versions</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:item_id</span><span class='rbracket'>]</span>
+ <span class='id identifier rubyid_add_index'>add_index</span> <span class='symbol'>:record_histories</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:item_id</span><span class='comma'>,</span> <span class='symbol'>:attr_name</span><span class='rbracket'>]</span>
+ <span class='id identifier rubyid_add_index'>add_index</span> <span class='symbol'>:record_histories</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:item_id</span><span class='rbracket'>]</span>
+ <span class='id identifier rubyid_add_index'>add_index</span> <span class='symbol'>:record_histories</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:author_type</span><span class='comma'>,</span> <span class='symbol'>:author_id</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
@@ -240,7 +246,7 @@
</div>
<div id="footer">
- Generated on Tue Feb 21 13:39:16 2012 by
+ Generated on Fri Feb 24 12:04:59 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
View
@@ -73,7 +73,7 @@
<dt class="r1 last">Defined in:</dt>
<dd class="r1 last">lib/record_history.rb<span class="defines">,<br />
- lib/record_history/version.rb,<br /> lib/generators/record_history/install_generator.rb</span>
+ lib/record_history/version.rb,<br /> lib/record_history/controller.rb,<br /> lib/record_history/has_record_history.rb,<br /> lib/generators/record_history/install_generator.rb</span>
</dd>
</dl>
@@ -83,6 +83,8 @@
<p class="children">
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="RecordHistory/Controller.html" title="RecordHistory::Controller (module)">Controller</a></span>, <span class='object_link'><a href="RecordHistory/Model.html" title="RecordHistory::Model (module)">Model</a></span>
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="RecordHistory/InstallGenerator.html" title="RecordHistory::InstallGenerator (class)">InstallGenerator</a></span>
@@ -97,7 +99,12 @@
<dt id="VERSION-constant" class="">VERSION =
</dt>
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.2</span><span class='tstring_end'>&quot;</span></span></pre></dd>
+
+ <dt id="config-classvariable" class="">@@config =
+
+ </dt>
+ <dd><pre class="code"><span class='lbrace'>{</span><span class='rbrace'>}</span></pre></dd>
</dl>
@@ -108,12 +115,127 @@
+
+ <h2>
+ Class Method Summary
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
+ </h2>
+
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#author-class_method" title="author (class method)">+ (Object) <strong>author</strong> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'></div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#author%3D-class_method" title="author= (class method)">+ (Object) <strong>author=</strong>(value) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'></div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+ <div id="class_method_details" class="method_details_list">
+ <h2>Class Method Details</h2>
+
+
+ <div class="method_details first">
+ <p class="signature first" id="author-class_method">
+
+ + (<tt>Object</tt>) <strong>author</strong>
+
+
+
+</p><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+14
+15
+16</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/record_history.rb', line 14</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_author'>author</span>
+ <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:author</span><span class='rbracket'>]</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <p class="signature " id="author=-class_method">
+
+ + (<tt>Object</tt>) <strong>author=</strong>(value)
+
+
+
+</p><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+10
+11
+12</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/record_history.rb', line 10</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_author='>author=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:author</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
</div>
<div id="footer">
- Generated on Tue Feb 21 13:39:15 2012 by
+ Generated on Fri Feb 24 12:04:59 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Oops, something went wrong.

0 comments on commit 231bda6

Please sign in to comment.