Class: LocalTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
Calabash::Cucumber
Defined in:
lib/calabash-cucumber/version.rb

Constant Summary

Constants included from Calabash::Cucumber

Calabash::Cucumber::MIN_SERVER_VERSION, Calabash::Cucumber::VERSION

Constants included from Calabash::Cucumber::Logging

Calabash::Cucumber::Logging::CALABASH_NO_DEPRECATION

Instance Method Summary collapse

Methods included from Calabash::Cucumber

const_missing

Methods included from Calabash::Cucumber::Logging

#_deprecated, #calabash_info, #calabash_warn, #debug_logging?, #full_console_logging?, #no_deprecation_warnings?

Instance Method Details

#test_compare_equalObject



123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/calabash-cucumber/version.rb', line 123

def test_compare_equal
  a = Version.new('0.9.169')
  b = Version.new('0.9.169')
  assert(a == b)

  a = Version.new('0.9.169.pre')
  b = Version.new('0.9.169.pre')
  assert(a == b)

  a = Version.new('0.9.169.pre2')
  b = Version.new('0.9.169.pre2')
  assert(a == b)

end

#test_compare_gtObject



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/calabash-cucumber/version.rb', line 175

def test_compare_gt
  a = Version.new('0.9.169')
  b = Version.new('0.9.168')
  assert(a > b)

  a = Version.new('0.9.169.pre')
  b = Version.new('0.9.169')
  assert(a > b)

  a = Version.new('0.9.169.pre1')
  b = Version.new('0.9.169.pre')
  assert(a > b)

  a = Version.new('0.9.169.pre2')
  b = Version.new('0.9.169.pre1')
  assert(a > b)
end

#test_compare_gteObject



201
202
203
204
205
206
207
# File 'lib/calabash-cucumber/version.rb', line 201

def test_compare_gte
  a = Version.new('0.9.169')
  b = Version.new('0.9.168')
  assert(a >= b)
  b = Version.new('0.9.169')
  assert(a >= b)
end

#test_compare_ltObject



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/calabash-cucumber/version.rb', line 157

def test_compare_lt
  a = Version.new('0.9.168')
  b = Version.new('0.9.169')
  assert(a < b)

  a = Version.new('0.9.169')
  b = Version.new('0.9.169.pre')
  assert(a < b)

  a = Version.new('0.9.169.pre')
  b = Version.new('0.9.169.pre1')
  assert(a < b)

  a = Version.new('0.9.169.pre1')
  b = Version.new('0.9.169.pre2')
  assert(a < b)
end

#test_compare_lteObject



193
194
195
196
197
198
199
# File 'lib/calabash-cucumber/version.rb', line 193

def test_compare_lte
  a = Version.new('0.9.168')
  b = Version.new('0.9.169')
  assert(a <= b)
  a = Version.new('0.9.169')
  assert(a <= b)
end

#test_compare_not_equalObject



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/calabash-cucumber/version.rb', line 138

def test_compare_not_equal
  a = Version.new('0.9.168')
  b = Version.new('0.9.169')
  assert(a != b)


  a = Version.new('0.9.169')
  b = Version.new('0.9.169.pre1')
  assert(a != b)

  a = Version.new('0.9.169.pre')
  b = Version.new('0.9.169.pre1')
  assert(a != b)

  a = Version.new('0.9.169.pre1')
  b = Version.new('0.9.169.pre2')
  assert(a != b)
end

#test_numbered_prereleaseObject



117
118
119
120
121
# File 'lib/calabash-cucumber/version.rb', line 117

def test_numbered_prerelease
  a = Version.new('0.9.169.pre1')
  assert_equal('pre1', a.pre)
  assert_equal(1, a.pre_version)
end

#test_unnumbered_prereleaseObject



111
112
113
114
115
# File 'lib/calabash-cucumber/version.rb', line 111

def test_unnumbered_prerelease
  a = Version.new('0.9.169.pre')
  assert_equal('pre', a.pre)
  assert_nil(a.pre_version)
end

#test_versionObject



102
103
104
105
106
107
108
109
# File 'lib/calabash-cucumber/version.rb', line 102

def test_version
  a = Version.new('0.9.169')
  assert_equal(0, a.major)
  assert_equal(9, a.minor)
  assert_equal(169, a.patch)
  assert_nil(a.pre)
  assert_nil(a.pre_version)
end