tset 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f27830bfa45780af901203d61a7fc1b52dc906dd
4
- data.tar.gz: 73e19fa5e554d5ee50f6737bc05dbad47e077d43
3
+ metadata.gz: 4904fee39decfb7a43e0b4df9ef737b4bc2374db
4
+ data.tar.gz: 034daa9d3098f0fbcc3ac6e7f97f159e28cfecc6
5
5
  SHA512:
6
- metadata.gz: cf6b9261c29093169b72eb15291375d5fbce2e9190c9d163b10a6c71bee4137301d9609f8b6bab82a75036e9270508875c29375bc29befda0cb09677e56e0f70
7
- data.tar.gz: 650a7258cad0b33de4f6df0075e2142dcea56e056d648d6d0d224881127e91bd8c3482b3236c4e387e1ad7c2a1a39b90449af5ca7cd28bf30fd7b114ab21315e
6
+ metadata.gz: 2a76a5680f809bffae2f0546b08cb80733a968550dd2699d42fdfd42ce60bfbe0113bf3f27262191be2ecdfb82c3681f5bdd0bf101a4a57d701a1d510a0c13f6
7
+ data.tar.gz: 06e9885bf0dcf8d8a6e6957dcf1d9a3ca09a1950ae98f6e9a865df307675e6a74c14cf5f360cd529404cad7a41de8505ff3b8d7c8acdd8898d6efc809ddf27e6
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ cache: bundler
3
+
4
+ rvm:
5
+ - 2.2.0
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Tset
2
2
 
3
+ [![Build Status](https://travis-ci.org/sungwoncho/tset.svg?branch=master)](https://travis-ci.org/sungwoncho/tset)
4
+
3
5
  Tset generates tests for your models in your Rails application.
4
6
 
5
7
  ## Why?
@@ -16,13 +18,17 @@ Run installation command.
16
18
  gem install tset
17
19
  ```
18
20
 
19
- OR if you are using bundler,
21
+ ---
22
+
23
+ *OR* if you want to use bundler,
20
24
 
21
25
  ```ruby
22
26
  gem 'tset', group: :development
23
27
  ```
24
28
 
25
- Run `bundle`
29
+ Run `bundle install`.
30
+
31
+ Append `bundle exec` when you run tset commands.
26
32
 
27
33
  ## Usage
28
34
 
@@ -36,14 +42,34 @@ Tset will read your model and generate a test accordingly.
36
42
 
37
43
  By default, the Tset will use RSpec. Help us add MiniTest support by contributing.
38
44
 
39
- ## Fact
45
+ ## Dependency
46
+
47
+ You need [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) to run some of tests Tset generates for you.
48
+
49
+ It lets you use matchers such as `validate_presence_of(:name)` in your spec.
50
+
51
+ ## Architecture
52
+
53
+ There are four main objects at play: `Analyzer`, `Translator`, `Writer`, and `Generator`.
40
54
 
41
- * Tset is a test spelled backwards.
55
+ * Analyzer reads your model file, and matches any lines that are deemed 'testable'. It returns an array of `Tset::Testable` objects.
56
+
57
+ * Translator converts `Tset::Testable` objects into `Tset::Test` objects.
58
+
59
+ * Writer writes the actual test in the spec file, for each `Tset::Test` objects.
60
+
61
+ * Generator copies spec templates, groups all major components together, and responds to CLI.
62
+
63
+ ## Random
64
+
65
+ Tset is a test spelled backwards.
42
66
 
43
67
  ## Contributing
44
68
 
69
+ Tset is in beta. We need your help to improve it.
70
+
45
71
  ### TODO
46
72
 
47
- * Help us improve Tset by adding more test rules located in translators.
73
+ * Add more translation rules for testables (located in `tset/translators/rspec.rb`).
48
74
  * Support MiniTest.
49
75
  * Support controllers.
@@ -6,7 +6,7 @@ require "pathname"
6
6
  # Reads the model file and breaks it down into an array of testables.
7
7
  #
8
8
  # @param name [String] the name of the model
9
- # @return [Array] the model codes for which tests can be generated.
9
+ # @return [Array] Tset::Testable objects containing codes and test category.
10
10
  #
11
11
  module Tset
12
12
  module Analyzers
@@ -1,4 +1,5 @@
1
1
  require "tset/translators/abstract"
2
+ require "tset/test"
2
3
 
3
4
  module Tset
4
5
  module Translators
@@ -1,3 +1,3 @@
1
1
  module Tset
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sung Won Cho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-10 00:00:00.000000000 Z
11
+ date: 2015-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,6 +90,7 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - ".gitignore"
92
92
  - ".rspec"
93
+ - ".travis.yml"
93
94
  - Gemfile
94
95
  - LICENSE.txt
95
96
  - README.md