cheezburger 1.0.0

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.
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_DISABLE_SHARED_GEMS: "1"
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --format documentation
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm --create use ruby-1.8.7@cheezburger > /dev/null
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :gemcutter
2
+
3
+ gem "rspec", ">= 2.0.0.beta.20"
@@ -0,0 +1,18 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.1.2)
5
+ rspec (2.0.0.beta.20)
6
+ rspec-core (= 2.0.0.beta.20)
7
+ rspec-expectations (= 2.0.0.beta.20)
8
+ rspec-mocks (= 2.0.0.beta.20)
9
+ rspec-core (2.0.0.beta.20)
10
+ rspec-expectations (2.0.0.beta.20)
11
+ diff-lcs (>= 1.1.2)
12
+ rspec-mocks (2.0.0.beta.20)
13
+
14
+ PLATFORMS
15
+ ruby
16
+
17
+ DEPENDENCIES
18
+ rspec (>= 2.0.0.beta.20)
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Josep M. Bach
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,73 @@
1
+ = cheezburger
2
+
3
+ RSpec for lolcats! BDD can be fun too :)
4
+
5
+ Just put it in your Gemfile:
6
+
7
+ gem "cheezburger"
8
+
9
+ And your RSpec files can now be written by cute kittehs (this are cheezburger's own specs, just to see what you can do with it!)
10
+
11
+ discrieb "Cheezburger" do
12
+
13
+ dey { Array.new }
14
+
15
+ deyr(:class) { shud == Array }
16
+
17
+ iz(:kitteh) { double('kitteh') }
18
+
19
+ srsly "shud haz cheezburger" do # srsly maeks examplez :focused
20
+ kitteh
21
+ dey.shud_nawt be_nil
22
+
23
+ dey.sez(:size).and_return(3)
24
+
25
+ [3,4,2].shoodz haz(3).elements
26
+ i_hoep {2 + 3}.twerk # twerk meanz to_nawt raise_error
27
+ meh_hoeps {2 + 3}.to_nawt raise_error
28
+ tihs {2 + 3}.shoodz_nawt raise_error
29
+ end
30
+
31
+ # Shared examplez!
32
+ fings_dat_maeks "a kitteh" do
33
+ I "haz cheez" do
34
+ i_hoep { ['cheez', 'plz'] }.twerk
35
+ end
36
+ end
37
+
38
+ it_maeks_tings_liek "a kitteh"
39
+
40
+
41
+ discrieb "moar kool tings" do
42
+
43
+ suroundid_bai "hyoominz" do
44
+ I "shud liek karot" do
45
+ laterz "lol"
46
+ end
47
+ end
48
+
49
+ I "shud be kyoot" do
50
+ dey.shud_get(:toothbrush).and_return("wrrrr")
51
+ dey.shud_nawt_get(:confoozled).and_return("kthxbai")
52
+
53
+ dey.toothbrush # => "wrrrrrr" kitteh iz kyoot
54
+ end
55
+ end
56
+
57
+ fur_laterz "shud haz moar cheezburger"
58
+
59
+ end
60
+
61
+ == Note on Patches/Pull Requests
62
+
63
+ * Fork the project.
64
+ * Make your feature addition or bug fix.
65
+ * Add tests for it. This is important so I don't break it in a
66
+ future version unintentionally.
67
+ * Commit, do not mess with rakefile, version, or history.
68
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
69
+ * Send me a pull request. Bonus points for topic branches.
70
+
71
+ == Copyright
72
+
73
+ Copyright (c) 2010 Josep M. Bach. See LICENSE for details.
@@ -0,0 +1,35 @@
1
+ # coding: utf-8
2
+ require 'rubygems'
3
+ require 'rake'
4
+
5
+ begin
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ gem.name = "cheezburger"
9
+ gem.summary = "BDD for lolcats!"
10
+ gem.description = "BDD for lolcats! Just require it in your Gemfile and you got funny specs for free!"
11
+ gem.email = "info@codegram.com"
12
+ gem.homepage = "http://github.com/codegram/cheezburger"
13
+ gem.authors = ["Oriol Gual", "Josep M. Bach", "Josep Jaume Rey"]
14
+
15
+ gem.add_dependency 'rspec', ">= 2.0.0.beta.20"
16
+
17
+ gem.add_development_dependency "jeweler", '>= 1.4.0'
18
+ gem.add_development_dependency "bundler", '>= 1.0.0'
19
+ end
20
+ Jeweler::GemcutterTasks.new
21
+ rescue LoadError
22
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
23
+ end
24
+
25
+ # Rake RSpec2 task stuff
26
+ gem 'rspec', '>= 2.0.0.beta.20'
27
+ gem 'rspec-expectations'
28
+
29
+ require 'rspec/core/rake_task'
30
+
31
+ desc "Run the specs under spec"
32
+ RSpec::Core::RakeTask.new do |t|
33
+ end
34
+
35
+ task :default => :spec
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,64 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{cheezburger}
8
+ s.version = "1.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Oriol Gual", "Josep M. Bach", "Josep Jaume Rey"]
12
+ s.date = %q{2010-09-03}
13
+ s.description = %q{BDD for lolcats! Just require it in your Gemfile and you got funny specs for free!}
14
+ s.email = %q{info@codegram.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".bundle/config",
21
+ ".gitignore",
22
+ ".rspec",
23
+ ".rvmrc",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "LICENSE",
27
+ "README.rdoc",
28
+ "Rakefile",
29
+ "VERSION",
30
+ "cheezburger.gemspec",
31
+ "lib/cheezburger.rb",
32
+ "spec/cheezburger_spec.rb",
33
+ "spec/spec_helper.rb"
34
+ ]
35
+ s.homepage = %q{http://github.com/codegram/cheezburger}
36
+ s.rdoc_options = ["--charset=UTF-8"]
37
+ s.require_paths = ["lib"]
38
+ s.rubygems_version = %q{1.3.7}
39
+ s.summary = %q{BDD for lolcats!}
40
+ s.test_files = [
41
+ "spec/cheezburger_spec.rb",
42
+ "spec/spec_helper.rb"
43
+ ]
44
+
45
+ if s.respond_to? :specification_version then
46
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
47
+ s.specification_version = 3
48
+
49
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
50
+ s.add_runtime_dependency(%q<rspec>, [">= 2.0.0.beta.20"])
51
+ s.add_development_dependency(%q<jeweler>, [">= 1.4.0"])
52
+ s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
53
+ else
54
+ s.add_dependency(%q<rspec>, [">= 2.0.0.beta.20"])
55
+ s.add_dependency(%q<jeweler>, [">= 1.4.0"])
56
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
57
+ end
58
+ else
59
+ s.add_dependency(%q<rspec>, [">= 2.0.0.beta.20"])
60
+ s.add_dependency(%q<jeweler>, [">= 1.4.0"])
61
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
62
+ end
63
+ end
64
+
@@ -0,0 +1,99 @@
1
+ require 'rspec'
2
+
3
+ module Kernel
4
+ alias :shud :should
5
+ alias :shoodz :should
6
+ alias :should_nawt :should_not
7
+ alias :shud_nawt :should_not
8
+ alias :shoodz_nawt :should_not
9
+ end
10
+ module RSpec
11
+
12
+ module Core
13
+
14
+ module Subject
15
+ module ClassMethods
16
+ alias :dey :subject # dey { Object.new }
17
+ alias :deyr :its
18
+ end
19
+ alias :dey :subject # dey.shud_nawt be_nil
20
+ end
21
+
22
+ module SharedExampleGroup
23
+ alias :fings_dat_maeks :shared_examples_for
24
+ end
25
+
26
+ module Let
27
+ module ClassMethods
28
+ alias :iz :let
29
+ end
30
+ end
31
+
32
+ module Pending
33
+ alias :laterz :pending
34
+ end
35
+
36
+ class ExampleGroup
37
+ module BlockAliases
38
+ alias_method :to_nawt, :to_not
39
+ def twerk
40
+ to_not Matchers::RaiseError.new, "shoodz werk"
41
+ end
42
+ end
43
+ alias :thiz :expect
44
+ alias :tihs :expect
45
+ alias :dis :expect
46
+ alias :i_hoep :expect
47
+ alias :meh_hoeps :expect
48
+
49
+ alias_method :shud, :should
50
+ alias_method :shoodz, :should
51
+ alias_method :should_nawt, :should_not
52
+ alias_method :shud_nawt, :should_not
53
+ alias_method :shoodz_nawt, :should_not
54
+
55
+ alias_example_to :I
56
+ alias_example_to :specify
57
+ alias_example_to :srsly, :focused => true
58
+ alias_example_to :fur_laterz, :pending => true
59
+
60
+ alias_it_should_behave_like_to :it_maeks_tings_liek, "maeks tings liek"
61
+
62
+ class << self
63
+ alias_method :discrieb, :describe
64
+ alias_method :suroundid_bai, :context
65
+ end
66
+
67
+ end
68
+
69
+ module ObjectExtensions
70
+ alias :discrieb :describe
71
+ alias :suroundid_bai :context
72
+ end
73
+
74
+ end
75
+
76
+ module Matchers
77
+ alias :haz :have
78
+ alias :haz_at_least :have_at_least
79
+ alias :haz_at_most :have_at_most
80
+
81
+ class Has
82
+ private
83
+ def predicate(sym)
84
+ "#{sym.to_s.sub("haz_","has_")}?".to_sym
85
+ end
86
+ end
87
+ end
88
+
89
+ module Mocks
90
+ module Methods
91
+ alias_method :sez, :stub
92
+ alias_method :unsez, :unstub
93
+
94
+ alias_method :shud_get, :should_receive
95
+ alias_method :shud_nawt_get, :should_not_receive
96
+ end
97
+ end
98
+
99
+ end
@@ -0,0 +1,49 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ discrieb "Cheezburger" do
4
+
5
+ dey { Array.new }
6
+
7
+ deyr(:class) { shud == Array }
8
+
9
+ iz(:kitteh) { double('kitteh') }
10
+
11
+ fings_dat_maeks "a kitteh" do
12
+ I "haz cheez" do
13
+ i_hoep { ['cheez', 'plz'] }.twerk
14
+ end
15
+ end
16
+
17
+ it_maeks_tings_liek "a kitteh"
18
+
19
+ srsly "shud haz cheezburger" do
20
+ kitteh
21
+ dey.shud_nawt be_nil
22
+
23
+ dey.sez(:size).and_return(3)
24
+
25
+ [3,4,2].shoodz haz(3).elements
26
+ i_hoep {2 + 3}.twerk
27
+ meh_hoeps {2 + 3}.to_nawt raise_error
28
+ tihs {2 + 3}.shoodz_nawt raise_error
29
+ end
30
+
31
+ discrieb "moar kool tings" do
32
+
33
+ suroundid_bai "hyoominz" do
34
+ I "shud liek karot" do
35
+ laterz "lol"
36
+ end
37
+ end
38
+
39
+ I "shud be kyoot" do
40
+ dey.shud_get(:toothbrush).and_return("wrrrr")
41
+ dey.shud_nawt_get(:confoozled).and_return("kthxbai")
42
+
43
+ dey.toothbrush # => "wrrrrrr" kitteh iz kyoot
44
+ end
45
+ end
46
+
47
+ fur_laterz "shud haz moar cheezburger"
48
+
49
+ end
@@ -0,0 +1,4 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'cheezburger'
metadata ADDED
@@ -0,0 +1,133 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cheezburger
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Oriol Gual
14
+ - Josep M. Bach
15
+ - Josep Jaume Rey
16
+ autorequire:
17
+ bindir: bin
18
+ cert_chain: []
19
+
20
+ date: 2010-09-03 00:00:00 +02:00
21
+ default_executable:
22
+ dependencies:
23
+ - !ruby/object:Gem::Dependency
24
+ name: rspec
25
+ prerelease: false
26
+ requirement: &id001 !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ hash: 62196427
32
+ segments:
33
+ - 2
34
+ - 0
35
+ - 0
36
+ - beta
37
+ - 20
38
+ version: 2.0.0.beta.20
39
+ type: :runtime
40
+ version_requirements: *id001
41
+ - !ruby/object:Gem::Dependency
42
+ name: jeweler
43
+ prerelease: false
44
+ requirement: &id002 !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ hash: 7
50
+ segments:
51
+ - 1
52
+ - 4
53
+ - 0
54
+ version: 1.4.0
55
+ type: :development
56
+ version_requirements: *id002
57
+ - !ruby/object:Gem::Dependency
58
+ name: bundler
59
+ prerelease: false
60
+ requirement: &id003 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 23
66
+ segments:
67
+ - 1
68
+ - 0
69
+ - 0
70
+ version: 1.0.0
71
+ type: :development
72
+ version_requirements: *id003
73
+ description: BDD for lolcats! Just require it in your Gemfile and you got funny specs for free!
74
+ email: info@codegram.com
75
+ executables: []
76
+
77
+ extensions: []
78
+
79
+ extra_rdoc_files:
80
+ - LICENSE
81
+ - README.rdoc
82
+ files:
83
+ - .bundle/config
84
+ - .gitignore
85
+ - .rspec
86
+ - .rvmrc
87
+ - Gemfile
88
+ - Gemfile.lock
89
+ - LICENSE
90
+ - README.rdoc
91
+ - Rakefile
92
+ - VERSION
93
+ - cheezburger.gemspec
94
+ - lib/cheezburger.rb
95
+ - spec/cheezburger_spec.rb
96
+ - spec/spec_helper.rb
97
+ has_rdoc: true
98
+ homepage: http://github.com/codegram/cheezburger
99
+ licenses: []
100
+
101
+ post_install_message:
102
+ rdoc_options:
103
+ - --charset=UTF-8
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ hash: 3
112
+ segments:
113
+ - 0
114
+ version: "0"
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
122
+ - 0
123
+ version: "0"
124
+ requirements: []
125
+
126
+ rubyforge_project:
127
+ rubygems_version: 1.3.7
128
+ signing_key:
129
+ specification_version: 3
130
+ summary: BDD for lolcats!
131
+ test_files:
132
+ - spec/cheezburger_spec.rb
133
+ - spec/spec_helper.rb