Hi,
Can you tell me how to fetch today's date and decrement month or day or year.
This is basically to test the functionality of date which must be today or in
the past.
Regards
Sapna
___
Wtr-general mailing list
Wtr-general@rubyforge.org
Hi,
You can refer to following link for more details on how to format date.
http://www.ruby.ch/ProgrammingRuby/htmlC/ref_c_time.html#strftime
- Angrez
On 5/30/07, sapna [EMAIL PROTECTED] wrote:
Hi,
Can you tell me how to fetch today's date and decrement month or day or
year. This is
Hi Sapna,
This is how to get date formated like you need.
Time.now.strftime(%m/%d/%Y)
= 05/30/2007
You can get yesterdays date by subtracting seconds from current time.
t = Time.now-(60*60*24)
= Tue May 29 12:21:02 Central European Standard Time 2007
t.strftime(%m/%d/%Y)
= 05/29/2007
Zeljko
#Hi
#Is it possible to instantiate a class that inherits from Test::Unit
require 'test\unit'
class Login Test::Unit::TestCase
def username;$ie.text_field(:name, 'username');end
def password;$ie.text_field(:name, 'password');end
def sign_in;$ie.button(:alt, /Log in/);end
def
Hello Again All,
I have created a couple of large test suites, which use LOTS of requires
require 'dir/test1'
require 'dir/test2'
...
require 'dir/test25'
In an effort to create tidier looking code, is it possible to use something
like Java would have to import, or 'require' all the files in
I use this method:
def require_files_in_dir( start_dir )
files = Dir[ start_dir]
files.each do |f|
require f
end
end
- Original Message -
From: Fletch [EMAIL PROTECTED]
Date: Wednesday, May 30, 2007 9:16 am
Subject: [Wtr-general] 'Require' Lots
Thanks for the reply - not to sound silly at all, but where do I put this
method?
All the require files normally go at the top of the file, but I have tried
putting the code everywhere I can think of and still have had no luck.
--
require
className
def test1
end
def test2
end
end
def require_files_in_dir
end
require_files_in_dir( 'c:\')
require_files_in_dir( 'c:\temp')
- Original Message -
From: Fletch [EMAIL PROTECTED]
Date: Wednesday, May 30, 2007 9:39 am
Subject: Re: [Wtr-general] 'Require' Lots Of Files
Thanks for the reply - not to sound silly at
just saw your other question..
doing
def some_method
end
def some_other_method
end
class Foo
end
class Foo2
end
makes the some_method and some_other_method accessable to all - what ruby does
is adds them to class Object, which is the super class of everything - you can
see this by doing
actually it seems you have to use it like this
require_files_in_dir( 'c:\*.rb')
- Original Message -
From: Paul Rogers [EMAIL PROTECTED]
Date: Wednesday, May 30, 2007 9:43 am
Subject: Re: [Wtr-general] 'Require' Lots Of Files
def require_files_in_dir
end
Thanks,
I still can not get it sorted.
My methods are set up in a (java style) static context - FILENAME.methodName,
and when I use the method for the requires, I am getting an uninitialized
constant error message.
___
Wtr-general mailing list
What I do is if I have to require a certain set of files repeatedly, I just
place it in another .rb file and require that .rb file which will in turn
require all of the files you need.
So I would define a file called requirements.rb
and then inside that file place
require 'x'
require
an alternative could be:
irb ie.form(:index, 1).checkboxes.find_all{|checkbox| checkbox.checked?}
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Hi Aidy,
You can mix in the assertions if that's all you're looking for:
On 5/30/07, aidy lewis [EMAIL PROTECTED] wrote:
#Hi
#Is it possible to instantiate a class that inherits from Test::Unit
require 'test\unit\assertions'
class Login # Test::Unit::TestCase
include
Why not put all those files into a gem?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bach Le
Sent: Wednesday, May 30, 2007 10:30 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] 'Require' Lots Of Files
What I do is if I have to require a
Hi,
I'm having the same problem and I was wondering if anybody had found a solution.
My program works well until I click on the download button, and then the popup
window for saving shows up. It keeps running but doesn't click on the save
button. I tried the previous code, but it doesn't
Fletch wrote:
I have created a couple of large test suites, which use LOTS of requires
require 'dir/test1'
require 'dir/test2'
...
require 'dir/test25'
In an effort to create tidier looking code, is it possible to use something
like Java would have to import, or 'require' all the files
aidy lewis wrote:
#Is it possible to instantiate a class that inherits from Test::Unit
Yes it is. Why do you ask? Did you try this and run into trouble? What
kind of trouble?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
Some of you may have seen some of the recent announcements from
Microsoft regarding their plans to support Ruby in the .Net environment.
This is an excellent post that analyzes the impact that this may have:
http://martinfowler.com/bliki/RubyMicrosoft.html
Bret
Hi
when i click on a table.the table opens a new window with a title which was not
there in table.so i am facing a problem to identify the new window title.How
can i get the TITLE of window ? as i may not click on same table all the time.
___
20 matches
Mail list logo