jspec 3.1.3 → 3.2.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.
data/History.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 3.2.0 / 2010-01-27
3
+ ==================
4
+
5
+ * Added support for running specs in WebKit nightlies.
6
+ * Fixed bug in dom.html templates that was incorrectly passing options to report() rather than run().
7
+
2
8
  3.1.3 / 2010-01-14
3
9
  ==================
4
10
 
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  # JSpec
3
3
 
4
4
  JSpec is a minimalistic JavaScript behavior driven development framework,
5
- providing **simple installatio**n, extremely **low learning curve**, absolutely **no pollution**
5
+ providing **simple installation**, extremely **low learning curve**, absolutely **no pollution**
6
6
  to core prototypes, async request support, and incredibly sexy syntax, tons of matchers
7
7
  and **much more**.
8
8
 
@@ -817,9 +817,10 @@ Browsers supported in core:
817
817
 
818
818
  - Browser::Default (system default)
819
819
  - Browser::Safari
820
+ - Browser::WebKit
820
821
  - Browser::Chrome
821
- - Browser::Opera
822
822
  - Browser::Firefox
823
+ - Browser::Opera
823
824
  - Browser::IE
824
825
 
825
826
  Supplied routes:
@@ -882,12 +883,13 @@ Or run via the terminal using Rhino:
882
883
 
883
884
  $ jspec run --rhino
884
885
 
885
- ## Support Browsers
886
+ ## Supported Browsers
886
887
 
887
888
  Browsers below are supported and can be found in _server/browsers.rb_, however
888
889
  your _spec/server.rb_ file may support additional browsers.
889
890
 
890
891
  - Safari
892
+ - WebKit
891
893
  - Chrome
892
894
  - Firefox
893
895
  - Opera
@@ -944,7 +946,7 @@ missed you on this list please let me know
944
946
 
945
947
  (The MIT License)
946
948
 
947
- Copyright (c) 2008 - 2009 TJ Holowaychuk <tj@vision-media.ca>
949
+ Copyright (c) 2008 - 2010 TJ Holowaychuk <tj@vision-media.ca>
948
950
 
949
951
  Permission is hereby granted, free of charge, to any person obtaining
950
952
  a copy of this software and associated documentation files (the
data/bin/jspec CHANGED
@@ -12,7 +12,7 @@ require 'src/installables'
12
12
  require 'src/server'
13
13
 
14
14
  program :name, 'JSpec'
15
- program :version, '3.1.3'
15
+ program :version, '3.2.0'
16
16
  program :description, 'JavaScript BDD Testing Framework'
17
17
  default_command :bind
18
18
 
@@ -158,7 +158,7 @@ command :run do |c|
158
158
  the [path] to spec/server.html'
159
159
  c.example 'Run once in default browser', 'jspec run'
160
160
  c.example 'Run once in Safari and Firefox', 'jspec run --browsers Safari,Firefox'
161
- c.example 'Run once in Opera, Firefox, and Chrome', 'jspec run --browsers opera,ff,chrome'
161
+ c.example 'Run once in Opera, Firefox, Chrome, and WebKit', 'jspec run --browsers opera,ff,chrome,webkit'
162
162
  c.example 'Run custom spec file', 'jspec run foo.html'
163
163
  c.example 'Auto-run browsers when a file is altered', 'jspec run --bind --browsers Safari,Firefox'
164
164
  c.example 'Shortcut for the previous example', 'jspec --browsers Safari,Firefox'
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{jspec}
5
- s.version = "3.1.3"
5
+ s.version = "3.2.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["TJ Holowaychuk"]
9
- s.date = %q{2010-01-14}
9
+ s.date = %q{2010-01-27}
10
10
  s.default_executable = %q{jspec}
11
11
  s.description = %q{JavaScript BDD Testing Framework}
12
12
  s.email = %q{tj@vision-media.ca}
@@ -4,7 +4,7 @@
4
4
  ;(function(){
5
5
 
6
6
  JSpec = {
7
- version : '3.1.3',
7
+ version : '3.2.0',
8
8
  assert : true,
9
9
  cache : {},
10
10
  suites : [],
@@ -189,6 +189,36 @@ class Browser
189
189
  end
190
190
  end
191
191
 
192
+ #--
193
+ # WebKit
194
+ #++
195
+
196
+ class WebKit < self
197
+ def self.matches_agent? string
198
+ string =~ / AppleWebKit\/[\d\.]+\+/i
199
+ end
200
+
201
+ def self.matches_name? string
202
+ string =~ /webkit|wk/i
203
+ end
204
+
205
+ def supported?
206
+ macos?
207
+ end
208
+
209
+ def setup
210
+ applescript 'tell application "WebKit" to make new document'
211
+ end
212
+
213
+ def visit uri
214
+ applescript 'tell application "WebKit" to set URL of front document to "' + uri + '"'
215
+ end
216
+
217
+ def to_s
218
+ 'WebKit Nightly'
219
+ end
220
+ end
221
+
192
222
  #--
193
223
  # Internet Explorer
194
224
  #++
@@ -9,8 +9,8 @@
9
9
  function runSuites() {
10
10
  JSpec
11
11
  .exec('unit/spec.js')
12
- .run()
13
- .report({ fixturePath: 'fixtures' })
12
+ .run({ fixturePath: 'fixtures' })
13
+ .report()
14
14
  }
15
15
  </script>
16
16
  </head>
@@ -9,8 +9,8 @@
9
9
  function runSuites() {
10
10
  JSpec
11
11
  .exec('unit/spec.js')
12
- .run()
13
- .report({ fixturePath: 'fixtures' })
12
+ .run({ fixturePath: 'fixtures' })
13
+ .report()
14
14
  }
15
15
  </script>
16
16
  </head>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-14 00:00:00 -08:00
12
+ date: 2010-01-27 00:00:00 -08:00
13
13
  default_executable: jspec
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency