Permalink
Browse files

allow the use of specific port

  • Loading branch information...
1 parent 0c4ff2b commit 222364d03fd32608f7be13153216ba2300d39985 @szabgab committed Jul 28, 2011
Showing with 7 additions and 5 deletions.
  1. +4 −1 bin/app.pl
  2. +3 −4 t/004_win.t
View
@@ -1,8 +1,11 @@
#!/usr/bin/env perl
use Dancer;
if ($ENV{DWIMMER_TEST}) {
- set log => 'warning';
+ set log => 'warning';
set startup_info => 0;
}
+if ($ENV{DWIMMER_PORT}) {
+ set port => $ENV{DWIMMER_PORT};
+}
use Dwimmer;
dance;
View
@@ -4,15 +4,14 @@ use warnings;
use t::lib::Dwimmer::Test;
$ENV{DWIMMER_TEST} = 1;
-start();
+$ENV{DWIMMER_PORT} = 3001;
-# TODO set my own port?
-# TODO eliminate the logging to the console?
+start();
eval "use Test::More";
require Test::WWW::Mechanize;
-my $url = "http://localhost:3000/";
+my $url = "http://localhost:$ENV{DWIMMER_PORT}/";
plan(tests => 1);

0 comments on commit 222364d

Please sign in to comment.