Hello.
I'm using Watir to perform some user interface tests. I've made my own
custom html formatter to make a screenshot and capture html of the
page, on which some spec fails.
Now, the problem is simple - I have to access the browser object from
my formatter to get window handle (for screenshot)
Hello.
I'm using Watir to perform some user interface tests. I've made my own
custom html formatter to make a screenshot and capture html of the
page, on which some spec fails.
Now, the problem is simple - I have to access the browser object from
my formatter to get window handle (for screenshot)
Thank you for the reply!
I have to admit that for a second I thought about using 'options'
somehow, but wasn't sure if it would work or not so i forgot the
possibility to use it at all and tried different approaches.
Anyway, it seems that your exact code snippet doesn't work so I made
one formatt
Hello.
I need to pass something from before :all to formatter. I know that i
could use options hash from spec and then get the value back in
formatter, but it doesn't work when i'm doing it from before :all.
So, this work:
# in spec
before :each do
options[:something] = 1
end
# in formatter
d
tions?
Any other solutions?
Jarmo
On Mar 6, 7:28 pm, David Chelimsky wrote:
> On Sat, Mar 6, 2010 at 11:09 AM, Jarmo Pertman wrote:
> > Hello.
>
> > I need to pass something from before :all to formatter. I know that i
> > could use options hash from spec and then get th
great of course if i wouldn't have to fill options two
times.
Jarmo
On Mar 7, 3:12 pm, David Chelimsky wrote:
> On Sat, Mar 6, 2010 at 12:33 PM, Jarmo Pertman wrote:
> > Since i'm using Watir
> > then i usually open up the browser in
> > before :all block like this:
&
Hello.
I wanted to include module into ExampleGroup to write less code within
examples, but was unable to do so. This seems to be strange, because
in regular Class it works and all methods within that module are also
accessible. See the example:
module MyModule
MyConstant = 1
def my_method
Why do you think that it's not working in regular Ruby either?
Check the following example to see that it does:
module MyModule
MyConstant = 1
def my_method
2
end
end
class MyClass
include MyModule
def initialize
p my_method
p MyModule::MyConstant
p MyConstant
end
end
Done!
Jarmo
On Jun 16, 5:22 pm, David Chelimsky wrote:
> Seems like a bug. Please submit it
> tohttp://github.com/rspec/rspec-core/issuesfor
> rspec-2,http://rspec.lighthouseapp.comto make sure it gets backported to
> rspec-1.
>
> Thx,
> David
___
r
ine options with spec.opts - e.g have higher
priority for command line options, BUT preserve spec.opts if they're
not overridden.
3) Make spec.opts to handle Ruby code.
4) Allow some way to specify global configuration options for RSpec.
I'm using RSpec 1.3.0 and don
Thank You!
If i understand correctly, then all the problems except #3 have been
solved in RSpec 2?
Nice that there are people with similar thoughts :)
Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net
On Jul 28, 10:27 pm, David Chelimsky wrote:
> I thinkh
Hello!
I'm trying to run autotest under Windows when using Rails 3.0.1 and
RSpec 2.0.1. It's not working so far. This is what happens:
C:\Users\jarmo\Desktop\minu\projects\Ruby\sample_app>autotest
loading autotest/rails_rspec2
style: RailsRspec2
bundle exec C:\bin\pik\Ruby-187-p302\bin\ruby -S C:/
No ideas, what might cause that problem? Could it be a Windows-only-
issue?
Jarmo
On Oct 22, 3:46 pm, Jarmo Pertman wrote:
> Hello!
>
> I'm trying to run autotest under Windows when using Rails 3.0.1 and
> RSpec 2.0.1. It's not working so far. This is what happens:
> C:
Hello!
I'm trying to migrate my scripts from RSpec 1.3.0 to 2.0.1 having some
issues so far.
1) I don't like is that ".rspec" has to be in the working directory
and cannot be anymore in "spec". Okay, i can issue "mv spec/
spec.opts .rspec" in my projects, but why isn't it supported?
2) If there
On Nov 4, 9:21 pm, Jarmo Pertman wrote:
> 3) Why does html formatter snippet show always failing line as:
> raise(RSpec::Expectations::ExpectationNotMetError.new(message))
>
> in 1.x it would show the failing line in the spec file instead... is
> this a bug?
I cannot reprodu
On Nov 4, 9:52 pm, Jarmo Pertman wrote:
> I cannot reproduce this problem currently with standard html formatter
> although i don't do anything with snippet extractor in my custom html
> formatter. I need to investigate why the problem happens now and then.
I've managed to rep
rcov -Ispec "./spec/my_lib_spec.rb" failed
It will pass of course if i'll add `require "rspec"` to somewhere.
Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Extensions, Kernel]
So, for some reason the module is not included when running with RCov.
By the way all the specs were working before with 1.3.0.
Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net
On Nov 4, 10:37 pm, Jarmo Pertman wrote:
> There seems to be also a pr
y if some of the problems in this thread are already
fixed in master, but i couldn't see any open bugs relating to any of
the problems described here.
Waiting for some solutions-explanations how to solve most of the
problems hopefully.
Jarmo Pertman
-
IT does r
I'd wait for some preliminary answers from you or anyone else from
core before opening up any new issues. The main blockers for me to
start using RSpec 2 are currently the subject {self} and html
formatter snippet problems.
Hopefully you'll find some time to answer to my provided feedba
I didn't refresh my browser before writing that reply thus didn't see
that you had already answered.
Going to create those issues soon.
Thanks for your feedback!
Jarmo
On Nov 5, 5:06 pm, David Chelimsky wrote:
> On Nov 5, 2010, at 7:02 AM, Jarmo Pertman wrote:
>
>
cess the ExampleGroup
from the Example instance it's already too late since ExampleGroup
description might be already flushed to the report. Haven't tried that
yet though.
Hopefully you understand my concern better now.
Jarmo Pertman
___
rspec
#x27;t include modules into example groups
with RSpec.configure
https://github.com/rspec/rspec-core/issues/issue/216
6) Subject#subject {self} causes stack overflow:
https://github.com/rspec/rspec-core/issues/issue/217
Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net
On Nov
2\bin\ruby.exe
I don't understand who makes that decision what should be executed via
bundler - is it RSpec? Rails? Bundler itself?
Anyway, maybe someone knows what makes up that exec command so i can
open up an issue at correct place.
Jarmo
On Oct 24, 9:20 pm, Jarmo Pertman wrote:
> N
On Nov 10, 4:06 pm, David Chelimsky wrote:
> On Nov 10, 2010, at 7:54 AM,JarmoPertmanwrote:
>
> > I didn't get any replies about that problem so far but i just managed
> > to find out how to make it work manually.
>
> What manual change did you make?
>
> > The problem is that the bundle exec is no
C:\Users\jarmo\Desktop\minu\projects\Ruby\sample_app>bundle exec c:
\Ruby\bin\ruby.exe --version
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
Thank you for the tip, David!
Jarmo
On Nov 10, 4:54 pm, Jarmo Pertman wrote:
> On Nov 10, 4:06 pm, David Chelimsky wrote:
>
> &g
Yup, understood and opened an issue in Bundler since it seems to be
the culprit in the end:
https://github.com/carlhuda/bundler/issues/issue/832
Just FYI if there's any other Windows/RSpec2/Autotest/Bundler user :)
Jarmo
On Nov 10, 5:23 pm, David Chelimsky wrote:
> On Nov 10, 2010, at 8:54 AM,J
Still no pointers about the small problem below?
On Nov 5, 10:29 pm, Jarmo Pertman wrote:
> On Nov 5, 1:52 pm, David Chelimsky wrote:
>
> > > 4) In 1.x i modified ExampleGroup's description in my html formatter
> > > to have some additional information in i
On Nov 10, 9:56 pm, Luis Lavena wrote:
> If you strip down the Bundler part, I'm under the same environment too :P
>
> While I can complain about Bundler doing weird things on Windows I
> decided to stop using it and switched to Isolate and invoke commands
> with "rake isolate:sh[autotest]"
I'm s
Just FYI, it is now:
https://github.com/rspec/rspec-core/commit/edb7f851a85ffe318a5d9d161c896bde448b61e1
Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net
On Dec 14, 3:25 pm, David Chelimsky wrote:
> On Dec 13, 2010, at 10:46 PM, Jonathan Linowes wrote:
>
> &
ore meaning to numbers
require "active_support"
div.should exist.in(2.minutes)
What do you guys think? Should i add that also into rspec-expectations
to make spec-ing easier where timing is involved? :)
Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net
__
01 AM, David Chelimsky wrote:
>
>
>
>
>
>
>
>
>
> > On Apr 16, 2011, at 4:56 PM, Jarmo Pertman wrote:
>
> > > Hello!
>
> > > I've just added a new cool matcher #in into my framework WatirSplash
> > > and thought that this could
On Apr 18, 4:21 pm, David Chelimsky wrote:
> > but it doesn't
> > conflict with matcher's #in anyway.
>
> It conflicts with the name :) It's a problem when we have one name that means
> completely different things in different contexts.
It depends :) That's the point of OOP that the methods wit
On Apr 18, 5:59 pm, David Chelimsky wrote:
> What do you think of within(n).seconds { ... }?
I'm not sure i understand it fully taking into account the examples
above. Let me try to write them below:
expect {
link.click
}.to change {div.text}.from("before").to("after").within(2).seconds
link
On Apr 19, 4:08 pm, David Chelimsky wrote:
> OK - I think I understand this better from this example. The idea here is
> that the matcher should keep asking if div.text == "after" until it returns
> true or 2 seconds have passed, whichever comes first, after which it fails.
> Correct? If so, th
No opinions on this anymore?
Jarmo
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Hi!
When having a file structure like this:
project
-spec
-subdir
-my_spec.rb
and then being in directory "project" and running command `rspec spec`
everything works as expected. If running `rspec spec/subdir` to run
only specs under spec/subdir then it doesn't work - it finds 0
examp
Hi!
We tried to upgrade our RSpec from 1.3.1 to 2.6 and are having some
problems. It seems that shared example group includes modules
differently in RSpec 2.
Consider the following code:
module MyModule
def testing
end
end
shared_examples_for "shared" do
include MyModule
it "works" do
Hi!
We tried to upgrade our RSpec from 1.3.1 to 2.6 and are having some
problems. It seems that shared example group includes modules
differently in RSpec 2.
Consider the following code:
module MyModule
def testing
end
end
shared_examples_for "shared" do
include MyModule
it "works" do
te
, 1.3.0)
rspec-core (2.6.3, 2.5.1, 2.3.1, 2.3.0, 2.2.1, 2.1.0)
rspec-expectations (2.6.0, 2.5.0, 2.3.0, 2.2.0, 2.1.0)
rspec-mocks (2.6.0, 2.5.0, 2.3.0, 2.2.0, 2.1.0)
rspec-rails (2.3.1, 2.1.0)
Jarmo
On Jun 1, 5:24 pm, David Chelimsky wrote:
> On Jun 1, 2011, at 9:14 AM, Jarmo Pertman wrot
unix-slashes...
Jarmo
On Jun 1, 5:24 pm, David Chelimsky wrote:
> On Jun 1, 2011, at 9:14 AM, Jarmo Pertman wrote:
>
> > Hi!
>
> > When having a file structure like this:
> > project
> > -spec
> > -subdir
> > -my_spec.rb
>
> > and
Thank you :)
Where can i see the differences between #it_should_behave_like,
#include_context and #include_examples?
Jarmo
On Jun 1, 5:42 pm, David Chelimsky wrote:
> On Jun 1, 2011, at 9:10 AM, Jarmo Pertman wrote:
>
>
>
>
>
>
>
>
>
> > Hi!
>
> >
Done https://github.com/rspec/rspec-core/issues/396
Jarmo
On Jun 1, 6:05 pm, David Chelimsky wrote:
> On Jun 1, 2011, at 10:05 AM, Jarmo Pertman wrote:
>
> > Thank you :)
>
> > Where can i see the differences between #it_should_behave_like,
> > #include_context and
Hi!
I have a directory structure something similar to:
spec/a/a_helper.rb
spec/a/a_spec.rb
spec/b/b_spec.rb
In a_helper.rb i'd like to do something like this:
RSpec.configure do |config|
config.before :each do
# do something for every example under "a" directory
end
end
It works okay if
Okay, I fiddled around a little and made this solution:
module Spec
module Example
module Subject
module ExampleMethods
def should(matcher=nil)
if matcher
self == subject ?
Spec::Expectations::PositiveExpectationHandler.handle_matcher(self,
matcher) : subj
I think that I don't understand what you mean by that exactly. I mean,
I patched the should and should_not methods in moule
Subject::ExampleMethods themselves, which means that this changes only
behaviour of subject itself e.g. it is already part of RSpec and don't
see how it would break matchers o
On May 8, 10:50 am, David Chelimsky wrote:
> This is pretty helpful, thanks for a more thorough explanation. I did
> add your patch locally, however, and it doesn't seem to solve the
> problem (I still get undefined method `ok?' when I run the example in
> your 2nd post).
Sorry. It didn't work b
Added patch and specs to
https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/816-possibility-to-use-self-as-a-subject-for-explicit-receiver
Jarmo
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-u
Thanks for adding this change into repo!
I'm quite surprised that anyone else haven't stumbled upon this
problem yet. I guess it's because most of spec'ing is done for Ruby
projects, so this functionality is not needed.
I have been thinking a little more about this topic and asked myself:
why not
On May 12, 6:21 am, David Chelimsky wrote:
>
> I don't want to promote using self as subject. I think being able to
> do so explicitly, as we can now with your previous patch, is perfectly
> reasonable. But doing so is a bit of a trick in my view, and runs
> counter to the overall intent of the st
On May 13, 7:08 pm, David Chelimsky wrote:
>
> I actually think that what you're doing is perfectly fine. Just not
> the common case. That's why I think it's OK to support explicitly
> assigning self as subject, but not making that a default behaviour.
>
> If it were me, and it's *not*, but if i
It seems that some examples at http://rspec.info are broken with
invalid html.
For example: http://rspec.info/documentation/before_and_after.html
All those spans there should not be visible, I think :) Isn't
rspec.info web tested well enough? :P
Best regards,
Jarmo
__
On May 25, 10:43 pm, aslak hellesoy wrote:
> > It seems that some examples athttp://rspec.infoare broken with
> > invalid html.
>
> > For example:http://rspec.info/documentation/before_and_after.html
>
> I assume you're referring
> to:http://validator.w3.org/check?uri=http%3A%2F%2Frspec.info%2Fdo
I wanted to start using autospec on my little (non-Rails) project. I'm
on Windows XP and have used it some time ago successfully (on the same
PC), although I've updated many gems in the meantime (RSpec for
example among others).
In short, everything is fine when all specs pass, but if some fails,
uation where failing reason is shown on 2 lines?
- Why won't anything puts'ed from autotest/discover.rb or autotest/
rspec.rb like they aren't loaded?
- Any other reasons why autotest behaviour might be broken?
Jarmo
On Jun 1, 12:56 am, David Chelimsky wrote:
> On Sun, May 31, 200
Ok. I've created failing example.
Just create project directory and spec directory into it and add there
one spec file:
describe "autospec" do
it "fails" do
"hi".should eql("hello")
end
end
It fails, but for autotest it is still green (thus making growl and
snar
Done at
https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/832-autotest-not-detecting-failing-examples-correctly-when-matcher-outputs-multiple-lines-of-information
I started even before you've replied, because that bugged me too
much :)
Jarmo
On Jun 2, 7:50 pm, David Chelimsky wrote:
>
Do you have any files, which might be changed during your failing
tests? Some temporary files or whatsoever? If that's the case, then
autotest thinks that you have made some changes already and tries to
run again. Solution would be to put that file into ignore list for
autotest.
On Jun 10, 6:28 am
58 matches
Mail list logo